> This page is for Developer.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.feedonomics.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.feedonomics.com/_mcp/server.

# OAuth Authorization

GET https://marketplace-order-api.feedamp.feedonomics.com/api/v1/authorize

Start of Oauth process a Seller's to authorize access to a marketplace in FeedAMP.

Reference: https://docs.feedonomics.com/developer/api-reference/rest/feed-amp-order-source-api/authentication/oauth

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Query parameters

- `response_type` (enum, required) — Specifies the OAuth authorization method. Only the Authorization code workflow is supported.
  - Allowed values: `code`
- `client_id` (string, required) — The account id given by Feedonomics as part of the onboarding process
- `state` (string, required) — A unique value provided for each authorization request. This value will be returned in the query parameters in the redirect_url so the request can be verified by the marketplace.
- `redirect_url` (string, required) — The fully qualified url that the seller will be sent to once the Oauth Authorization workflow has been completed. The url will have the query parameters returning the authorization code and the provided state

## Examples

**SDK Code**

```python
import requests

url = "https://marketplace-order-api.feedamp.feedonomics.com/api/v1/authorize"

querystring = {"client_id":"client_id","redirect_url":"https://domain.localhost/callback","response_type":"code","state":"state"}

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers, params=querystring)

print(response.json())
```

```javascript
const url = 'https://marketplace-order-api.feedamp.feedonomics.com/api/v1/authorize?client_id=client_id&redirect_url=https%3A%2F%2Fdomain.localhost%2Fcallback&response_type=code&state=state';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://marketplace-order-api.feedamp.feedonomics.com/api/v1/authorize?client_id=client_id&redirect_url=https%3A%2F%2Fdomain.localhost%2Fcallback&response_type=code&state=state"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://marketplace-order-api.feedamp.feedonomics.com/api/v1/authorize?client_id=client_id&redirect_url=https%3A%2F%2Fdomain.localhost%2Fcallback&response_type=code&state=state")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://marketplace-order-api.feedamp.feedonomics.com/api/v1/authorize?client_id=client_id&redirect_url=https%3A%2F%2Fdomain.localhost%2Fcallback&response_type=code&state=state")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://marketplace-order-api.feedamp.feedonomics.com/api/v1/authorize?client_id=client_id&redirect_url=https%3A%2F%2Fdomain.localhost%2Fcallback&response_type=code&state=state', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://marketplace-order-api.feedamp.feedonomics.com/api/v1/authorize?client_id=client_id&redirect_url=https%3A%2F%2Fdomain.localhost%2Fcallback&response_type=code&state=state");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://marketplace-order-api.feedamp.feedonomics.com/api/v1/authorize?client_id=client_id&redirect_url=https%3A%2F%2Fdomain.localhost%2Fcallback&response_type=code&state=state")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```