Authorization#
- class sp_api.api.Authorization(marketplace: ~sp_api.base.marketplaces.Marketplaces = Marketplaces.US, *, refresh_token=None, account='default', credentials=None, restricted_data_token=None, proxies=None, verify=True, timeout=None, version=None, credential_providers=None, auth_token_client_class=<class 'sp_api.auth.access_token_client.AccessTokenClient'>)#
Authorization SP-API Client :link:
The Selling Partner API for Authorization helps developers manage authorizations and check the specific permissions associated with a given authorization.
- grantless_scope: str = 'sellingpartnerapi::migration'#
- get_authorization_code(self, **kwargs) → ApiResponse#
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.
Examples
literal blocks:
Authorization().get_authorization_code()
- Parameters:
**kwargs
- Returns:
ApiResponse