question

yarivhashai avatar image
0 Likes"
yarivhashai asked ·

Problem getting token code for https://api.ebay.com/sell/account/v1/payment_policy

According to: http://developer.ebay.com/devzone/rest/ebay-rest/content/oauth-gen-app-token.html Created a post request for : https://api.sandbox.ebay.com/identity/v1/oauth2/token? grant_type=client_credentials& redirect_uri=RoiSaleGroup-RoiSaleG-27ed-4-ggwnu& scope= https://api.ebay.com/oauth/api_scope/sell.account with the following headers: Content-Type: application/x-www-form-urlencoded Authorization:Basic Um9pU2Fs.....(base64 of : ) Getting the following: { "error": "invalid_scope", "error_description": "client does not support scopes", "error_uri": null } The redirect_uri is the sandbox RuName. What do i miss? Thanks, Yariv
tokenoauth2tokens
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

· Write an Answer
zhuowei.developersupport@ebay.com avatar image
0 Likes"
zhuowei.developersupport@ebay.com answered ·
Hi yarivhashai, Are you trying to exchange the authorization code for an access token? If so, you will need to pass the 'code' parameter instead of 'scope' in your request. grant_type=authorization_code& code= & redirect_uri= Here are the steps: 1. Getting the user permissions: https://signin.sandbox.ebay.com/authorize? client_id= & redirect_uri= & response_type=code& state= & scope=https%3A%2F% 2Fapi.ebay.com%2Foauth%2Fapi_scope%2Fsell.account%20 https%3A%2F% 2Fapi.ebay.com%2Foauth%2Fapi_scope%2Fsell.inventory 2. obtaining the authorization code from the response. Here is a sample response: https://www.example.com/acceptURL.html? state= & code=v%5E1.1% ... NjA%3D 3. Make an OAuth call to exchange the authorization code for an access token HTTP headers: Content-Type = application/x-www-form-urlencoded Authorization = Basic URL: https://api.sandbox.ebay.com/identity/v1/oauth2/token Request body (wrapped for readability): grant_type=authorization_code& code= & redirect_uri= 4. Make a call to update your access token using a refresh token obtained in step 3 grant_type=refresh_token& refresh_token= &**scope**=https%3A%2F% 2Fapi.ebay.com%2Foauth%2Fapi_scope%2Fsell.account%20https%3A%2F% 2Fapi.ebay.com%2Foauth%2Fapi_scope%2Fsell.inventory Best Regards,
· Share
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.