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!
smartp-67
Posted 3 years ago·Last reply 2 years ago
8 comments
rithim83
·2 years agoI 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
iwantchai
·2 years agoThere 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.
qua.nga7
·3 years agoHello,
kegla8378
·3 years agoI'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?
smartp-67
OP3 years agoI'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"}
smartp-67
OP3 years agoSo 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.
five_notch_trading_post
·3 years agoHmm, 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:
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.
five_notch_trading_post
·3 years agoit 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-trying-to-handle-multiple/td-p/33593015
https://community.ebay.com/t5/Token-Messaging-Sandbox-related/Refresh-Token-From-where-to-get-eBay-Refresh-Token/m-p/33624499