authorization-api-model¶ ↑
AmzSpApi::AuthorizationApiModel
- the Ruby gem for the Selling Partner API for Authorization
The Selling Partner API for Authorization helps developers manage authorizations and check the specific permissions associated with a given authorization.
This SDK is automatically generated by the Swagger Codegen project:
-
API version: v1
-
Package version: 0.1.0
-
Build package: io.swagger.codegen.v3.generators.ruby.RubyClientCodegen For more information, please visit sellercentral.amazon.com/gp/mws/contactus.html
Installation¶ ↑
Build a gem¶ ↑
To build the Ruby code into a gem:
gem build authorization-api-model.gemspec
Then either install the gem locally:
gem install ./authorization-api-model-0.1.0.gem
(for development, run gem install --dev ./authorization-api-model-0.1.0.gem
to install the development dependencies)
or publish the gem to a gem hosting service, e.g. RubyGems.
Finally add this to the Gemfile:
gem 'authorization-api-model', '~> 0.1.0'
Install from Git¶ ↑
If the Ruby gem is hosted at a git repository: github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile:
gem 'authorization-api-model', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'
Include the Ruby code directly¶ ↑
Include the Ruby code directly using -I
as follows:
ruby -Ilib script.rb
Getting Started¶ ↑
Please follow the installation procedure and then run the following code:
# Load the gem require 'authorization-api-model' api_instance = AmzSpApi::AuthorizationApiModel::AuthorizationApi.new selling_partner_id = 'selling_partner_id_example' # String | 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. developer_id = 'developer_id_example' # String | Your developer ID. This must be one of the developer ID values that you provided when you registered your application in Developer Central. mws_auth_token = 'mws_auth_token_example' # String | The MWS Auth Token that was generated when the seller authorized your application on the Marketplace Appstore. begin #Returns the Login with Amazon (LWA) authorization code for an existing Amazon MWS authorization. result = api_instance.get_authorization_code(selling_partner_id, developer_id, mws_auth_token) p result rescue AmzSpApi::AuthorizationApiModel::ApiError => e puts "Exception when calling AuthorizationApi->get_authorization_code: #{e}" end
Documentation for API Endpoints¶ ↑
All URIs are relative to https://sellingpartnerapi-na.amazon.com/
Class | Method | HTTP request | Description ———— | ————- | ————- | ————- AmzSpApi::AuthorizationApiModel::AuthorizationApi | {get_authorization_code} | GET /authorization/v1/authorizationCode | Returns the Login with Amazon (LWA) authorization code for an existing Amazon MWS authorization.
Documentation for Models¶ ↑
Documentation for Authorization¶ ↑
All endpoints do not require authorization.