E Bay API call Error "Insufficient permissions to fulfill the request"

Viewed 506

I was integrating ebay api and want to create payment policy. According to this guide https://developer.ebay.com/api-docs/static/make-a-call.html i generated token and send it this postman. But it is throwing a error

{
    "errors": [
        {
            "errorId": 1100,
            "domain": "ACCESS",
            "category": "REQUEST",
            "message": "Access denied",
            "longMessage": "Insufficient permissions to fulfill the request."
        }
    ]
}

Please is there help or proper guide to full fil.

Headers:

enter image description here

1 Answers

Ensure that you are using the correct access tokens. In eBay, the User Access Token and the Application Access Tokens are separate entities to be used for differing purposes. From the eBay docs:

  1. Client credentials grant flow mints a new Application access token that you can use to access the resources owned by the application.
  2. Authorization code grant flow mints a new User access token that you can use to access the resources owned by the user.

The one that you should be using in your call is the User Access Token.

The application access token is minted on calling https://api.sandbox.ebay.com/identity/v1/oauth2/token with the header grant_type:client_credentials. The User Access Token is minted on calling the same URL, however, with the headers grant_type:authorization_code or grant_type:refresh_token.

Try to refresh the user token with by calling https://api.sandbox.ebay.com/identity/v1/oauth2/token with grant_type:refresh_token header and use that to authorize your call instead

Related