Authorization API reference

How to use the Authorization API to get authorization to call Selling Partner API operations on behalf of a seller who previously authorized you.

Overview

The Selling Partner API for Authorization helps developers manage authorizations and check the specific permissions associated with a given authorization.

Version information

Version : v1

Contact information

Contact : Selling Partner API Developer Support
Contact URL : https://sellercentral.amazon.com/gp/mws/contactus.html

License information

License : Apache License 2.0
License URL : http://www.apache.org/licenses/LICENSE-2.0

URI scheme

Host : sellingpartnerapi-na.amazon.com
Schemes : HTTPS

Consumes

  • application/json

Produces

  • application/json

Operations

getAuthorizationCode

Paths

Returns the Login with Amazon (LWA) authorization code for an existing Amazon MWS authorization.

GET /authorization/v1/authorizationCode

Operation: getAuthorizationCode

Description

With the getAuthorizationCode operation, you can request a Login With Amazon (LWA) authorization code that will allow you to call a Selling Partner API on behalf of a seller who has already authorized you to call Amazon Marketplace Web Service (Amazon MWS). You specify a developer ID, an MWS auth token, and a seller ID. Taken together, these represent the Amazon MWS authorization that the seller previously granted you. The operation returns an LWA authorization code that can be exchanged for a refresh token and access token representing authorization to call the Selling Partner API on the seller's behalf. By using this API, sellers who have already authorized you for Amazon MWS do not need to re-authorize you for the Selling Partner API.

Usage Plan:

Rate (requests per second)Burst
15

The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see Usage Plans and Rate Limits in the Selling Partner API.

Parameters

TypeNameDescriptionSchema
QuerysellingPartnerId
required
The seller ID of the seller for whom you are requesting Selling Partner API authorization. This must be the seller ID of the seller who authorized your application on the Marketplace Appstore.string
QuerydeveloperId
required
Your developer ID. This must be one of the developer ID values that you provided when you registered your application in Developer Central.string
QuerymwsAuthToken
required
The MWS Auth Token that was generated when the seller authorized your application on the Marketplace Appstore.string

Responses

HTTP CodeDescriptionSchema
200Success.
Headers :
x-amzn-RateLimit-Limit (string) : Your rate limit (requests per second) for this operation.
x-amzn-RequestId (string) : Unique request reference ID.
GetAuthorizationCodeResponse

For error status codes, descriptions and schemas, see Error responses and schemas.

Error Responses and Schemas

This table contains HTTP status codes and associated information for error responses.

HTTP CodeDescriptionSchema
400Request has missing or invalid parameters and cannot be parsed.
Headers:
x-amzn-RateLimit-Limit (string):Your rate limit (requests per second) for this operation.
x-amzn-RequestId (string):Unique request reference ID.
GetAuthorizationCodeResponse
403Indicates that access to the resource is forbidden. Possible reasons include Access Denied, Unauthorized, Expired Token, or Invalid Signature.
Headers:
x-amzn-RequestId (string):Unique request reference ID.
GetAuthorizationCodeResponse
404The resource specified does not exist.
Headers:
x-amzn-RateLimit-Limit (string):Your rate limit (requests per second) for this operation.
x-amzn-RequestId (string):Unique request reference ID.
GetAuthorizationCodeResponse
413The request size exceeded the maximum accepted size.
Headers:
x-amzn-RateLimit-Limit (string):Your rate limit (requests per second) for this operation.
Note: For this status code, the rate limit header is deprecated and no longer returned.
x-amzn-RequestId (string):Unique request reference ID.
GetAuthorizationCodeResponse
415The request payload is in an unsupported format.
Headers:
x-amzn-RateLimit-Limit (string):Your rate limit (requests per second) for this operation.
Note: For this status code, the rate limit header is deprecated and no longer returned.
x-amzn-RequestId (string):Unique request reference ID.
GetAuthorizationCodeResponse
429The frequency of requests was greater than allowed.
Headers:
x-amzn-RateLimit-Limit (string):Your rate limit (requests per second) for this operation.
Note: For this status code, the rate limit header is deprecated and no longer returned.
x-amzn-RequestId (string):Unique request reference ID.
GetAuthorizationCodeResponse
500An unexpected condition occurred that prevented the server from fulfilling the request.
Headers:
x-amzn-RateLimit-Limit (string):Your rate limit (requests per second) for this operation.
Note: For this status code, the rate limit header is deprecated and no longer returned.
x-amzn-RequestId (string):Unique request reference ID.
GetAuthorizationCodeResponse
503Temporary overloading or maintenance of the server.
Headers:
x-amzn-RateLimit-Limit (string):Your rate limit (requests per second) for this operation.
Note: For this status code, the rate limit header is deprecated and no longer returned.
x-amzn-RequestId (string):Unique request reference ID.
GetAuthorizationCodeResponse

Definitions

GetAuthorizationCodeResponse

The response schema for the GetAuthorizationCode operation.

NameDescriptionSchema
payload
optional
A Login with Amazon (LWA) authorization code.AuthorizationCode
errors
optional
A list of error responses returned when a request is unsuccessful.ErrorList

AuthorizationCode

A Login with Amazon (LWA) authorization code.

NameDescriptionSchema
authorizationCode
optional
A Login with Amazon (LWA) authorization code that can be exchanged for a refresh token and access token that authorize you to make calls to a Selling Partner API.string

ErrorList

A list of error responses returned when a request is unsuccessful.

Type : < Error > array

Error

Error response returned when the request is unsuccessful.

NameDescriptionSchema
code
required
An error code that identifies the type of error that occurred.string
message
required
A message that describes the error condition in a human-readable form.string
details
optional
Additional details that can help the caller understand or fix the issue.string