- The selection of appropriate scopes (client credentials and code grant flow scope) is a prerequisite for executing API calls.
To identify the required scopes, go to https://developer.eBay.com/develop/apis/restful-apis and click on Learn more for the respective resource (for example, Sell APIs).
- Click on the icon under the API Reference section for the respective API. An example is shown below for Feed API.
- Go to the specific API section and click View.
- Go to the OAuth scope section and take note of the respective scopes (for example, https://api.eBay.com/oauth/api_scope) and the type of Authorization (for example, authorization code grant flow in the below example) required for making the API call. For example, for code grant flow authorization, https://api.eBay.com/oauth/api_scope/sell.fulfillment is required to execute createOrderTask. Similarly, take note of all the scopes needed for the required APIs. Similarly, identify all the required scopes.
- To ensure that all the scopes noted down in the previous step are permitted
for the given account, go to https://developer.eBay.com/my/keys and select OAuth Scopes to get the list of available client credentials and code grant flow scopes. If any of the required scopes noted down in the previous step is missing, please contact eBay support to get access to the required scope.
How to obtain ClientId (API key), Client Secret (API secret), and Redirect URL
- Go to https://developer.eBay.com/develop/apis/restful-apis, log in with developer account credentials (if prompted), and select Application Keysets.
- Copy the App ID (Client ID) and Cert ID (Client secret) for the respective environment (Sandbox or Production).
- To get the Redirect URL, go to User Access Token.
- Go to Your eBay Sign-in Settings section and note the respective RuName (Redirect URL).