cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How do I add an API scope to my app?

Hi, I'm trying to add a scope, but I can't find a way to do it.  I've checked the API documentation as suggested, I can see it's not in the list of Scopes for my app, but there's no way to add a new one.

 

The API scope I want to add is https://api.ebay.com/oauth/api_scope/commerce.catalog.readonly

 

Knowledgebase doesn't seem to hold anything either.  I might be misunderstanding something, so feel free to explain it as though I'm stupid, with simple steps!

Message 1 of 9
latest reply
8 REPLIES 8

Re: How do I add an API scope to my app?

it depends on how your app is generating it's token, the scopes are given during the oauth authentication process, and in turn are tied to the token that gets generated.

 

a couple prior threads that might help:

https://community.ebay.com/t5/RESTful-Sell-APIs-Fulfillment/c-eBay-Utility-going-round-in-circles-tr...

 

https://community.ebay.com/t5/Token-Messaging-Sandbox-related/Refresh-Token-From-where-to-get-eBay-R...

 

Message 2 of 9
latest reply

Re: How do I add an API scope to my app?

I'm using the Client Credentials Grant method of obtaining a token, I couldn't see the correct method in the links provided.  I tried adding the scope seperated by a space to my existing scope, but I get:

Error: 400
{"error":"invalid_scope","error_description":"The requested scope is invalid, unknown, malformed, or exceeds the scope granted to the client"}

Message 3 of 9
latest reply

Re: How do I add an API scope to my app?

So I can see that scope allowed in my sandbox, but not in production, which is weird.  And I can't figure out how to request access to it.

Message 4 of 9
latest reply

Re: How do I add an API scope to my app?

Hmm, I have not needed to look in to requesting additional scope access yet, someone else might have to answer that aspect.

 

--but just to note, at least for me, the scope https://api.ebay.com/oauth/api_scope/commerce.catalog.readonly is listed under Authorization Code Grant Type (user token) for sandbox, and not Client Credential Grant Type (application token), (it is listed for neither in production).

 

And depending on the call you are attempting to use it on, for instance Catalog API getProduct:

https://developer.ebay.com/api-docs/commerce/catalog/resources/product/methods/getProduct

 

The docs in this case indicate it needs Authorization Code Grant Type:

OAuth scope

This request requires an access token created with the authorization code grant flow, using one or more scopes from the following list (please check your Application Keys page for a list of OAuth scopes available to your application):

https://api.ebay.com/oauth/api_scope/sell.inventory

https://api.ebay.com/oauth/api_scope/commerce.catalog.readonly

See OAuth access tokens for more information.

Note: Only the sell.inventory scope is required for selling applications, and only the commerce.catalog.readonly scope is required for buying applications.

 

and lists more than just that scope, so in this case you can use https://api.ebay.com/oauth/api_scope/sell.inventory for production.

 

Message 5 of 9
latest reply

Re: How do I add an API scope to my app?

I'm having the exact same issue. I need to add the https://api.ebay.com/oauth/api_scope/commerce.catalog.readonly scope to my Prod app.

 

Did you find a solution? 

Message 6 of 9
latest reply

Re: How do I add an API scope to my app?

Hello, 

  1. Log in to your eBay Developer Account and navigate to the "My Apps" section.
  2. Find your app and click on its name to access its details.
  3. Look for the "Scopes" or "Permissions" section for your app.
  4. In this section, you should see the existing scopes assigned to your app.
  5. If the scope you want to add (https://api.ebay.com/oauth/api_scope/commerce.catalog.readonly) is not listed, you need to request it from eBay.
  6. To request the new scope, you can reach out to eBay Developer Support or visit the eBay Developer Forums for assistance. Provide them with the details of your app and the specific scope you want to add.
Message 7 of 9
latest reply

Re: How do I add an API scope to my app?

There is no "My Apps" section.     I only see one app under Application Keys and it does not let me edit it at all.  i cant even find a way to delete and recreate it. 

Message 8 of 9
latest reply

Re: How do I add an API scope to my app?

I could not find a way to add new scope to OAuth client credential approach after going through all articles and posts. Somehow managed to get the API access by using traditional Ebay XML API.

 

 

You can still use the traditional xml API which is not REST refer https://developer.ebay.com/devzone/xml/docs/Concepts/MakingACall.html

 

For details you can pass AuthnAuth user token in headers which has 18 months expiry.

This is not the correct answer to the question but might help if someone struggling to get access to use EBay APIs

 

 

Message 9 of 9
latest reply