Authorization API reference

AmazonSPAPI

# 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

# Operations

getAuthorizationCode

# Paths

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

GET /authorization/v1/authorizationCode
1

# 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
1 5

For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.

# Parameters

Type Name Description Schema
Query sellingPartnerId
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
Query developerId
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
Query mwsAuthToken
required
The MWS Auth Token that was generated when the seller authorized your application on the Marketplace Appstore. string

# Responses

HTTP Code Description Schema
200 Success.
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 Code Description Schema
400 Request 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
403 Indicates 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
404 The 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
413 The 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
415 The 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
429 The 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
500 An 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
503 Temporary 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.

Name Description Schema
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.

Name Description Schema
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.

Name Description Schema
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