question

nihar-5519 avatar image
0 Likes"
nihar-5519 asked

Insufficient permissions to fulfill the request error when calling search in Catalog API

Hi, When using the API Explorer with the 'search' call in the Catalog API I'm getting a 403 Forbidden response with the message 'Insufficient permissions to fulfill the request.': { "errors": [ { "errorId": 1100, "domain": "ACCESS", "category": "REQUEST", "message": "Access denied", "longMessage": "Insufficient permissions to fulfill the request." } ] } The error for the 'search' call appears to be a permissions issue but everything seems to be OK. An application token is being used and the scope ' https://api.ebay.com/oauth/api_scope/commerce.catalog.readonly' is under the list of scopes granted for the key set. I can call 'getProductMetadataForCategories' from the Catalog API with a valid response returned. I'm wondering if I have to get permission from eBay specifically for that call. Has anyone else had this problem and/or know a solution to the problem? Thanks!
catalog apiapi explorerinsufficient permissions to fulfill the requestcatalog api product search
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.

davdevelope_0 avatar image
0 Likes"
davdevelope_0 answered
This request requires an access token created with the authorization code grant flow, which is also called a User access token. You can get a temporary User token through the API Explorer. See these docs for details on how to programatically generate User access tokens: https://developer.ebay.com/api-docs/static/oauth-authorization-code-grant.html
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.

nihar-5519 avatar image
0 Likes"
nihar-5519 answered
Thanks for that. Checking the [Catalog APi Search Call documentation][1] I can see the authorization code grant flow is required like you say. I'd missed this: > This request requires an access token created with the authorization code grant flow Using the API Explorer and a User Token I've now successfully called the API. Is there any way round this though as I need to call the search method via an application running on a server? Currently the application manages listings via the [eBay Large Merchant Services API][2] and now we need to identify and assign eBay Product Identifiers for listings for the new [Product-Based Shopping Experience][3]. Any thoughts or suggestions are appreciated. Many thanks. [1]: https://developer.ebay.com/api-docs/commerce/catalog/resources/product_summary/methods/search#h3-oauth-scope [2]: https://developer.ebay.com/DevZone/large-merchant-services/Concepts/LandAPIRef.html [3]: https://developer.ebay.com/api-docs/sell/static/inventory/pbc_playbook.html
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.