"Insufficient permissions to fulfill the request." for Deal-API
Hi,
for a public page in our site we want to show a preview of available deals from the Deals-API. But every time I try to load those deals I get the "Insufficient permissions to fulfill the request." error message. I suspect it might be related to scopes, but for the life of me I can't find what scope to use. Or maybe its something else entirely.
I request an Application Token with a request like this:
POST /identity/v1/oauth2/token HTTP/1.1
Content-Length: 82
Content-Type: application/x-www-form-urlencoded
Host: api.sandbox.ebay.com
Authorization: Basic <REMOVED>
Connection: close
grant_type=client_credentials&scope=https%3A%2F%2Fapi.ebay.com%2Foauth%2Fapi_scope
and then I try to load the deals using a request like this:
Can someone point me in the right direction?
mi149629
Posted 3 years ago·Last reply 3 years ago
6 comments
mi149629
OP3 years agoThanks for the hint. Somehow I browsed dozens of doc-pages and never ended up on that one.
developer_support@ebay
Hi @mi149629
Please refer to "OAuth scope" section on the API Documentation of call, to see the token and scope related information for the API call.
developer_support@ebay
Hi @att065 @mi149629
Buy Deal API call requires an access token created with the client credentials grant flow, using the scope "https://api.ebay.com/oauth/api_scope/buy.deal"
(please check your Application Keys page for a list of OAuth scopes available to your application):
For more information, please see Using OAuth to access eBay APIs
Although the eBay Buy APIs are available for anyone to use in eBay's sandbox environment, use of the APIs in production is restricted. Users must meet standard eligibility requirements, get approvals from eBay support organizations, and sign contracts with eBay to access the Buy APIs in production.
Please file an Application Growth Check to request for the API access.
mi149629
OP3 years agoThis is what I was looking for.
It still boggles my mind that this information is missing in the Deal-APIs description.
mi149629
OP3 years agoI also tried it with an test-user-token generated from the API-settings web-page but I still got the same error.
But that doesn't help much - at the point I want to show the data the user is not logged in yet - we want to show it as a teaser for him to log in.
att065
·3 years agoI got the same error when I was using an OAuth Application Token instead of an OAuth User Token.