Application Self Authorization SP-API


#1

I’m testing access to SP-API using Self Authorized application. I’m able to successfully generate a refresh token, but when I tried acquiring an access token with given refresh token, I get an Internal Server error (500). I’ve created policies with access to SP-API and an inline STS policy as described in selling-partner-api-docs/SellingPartnerApiDeveloperGuide.md at main · amzn/selling-partner-api-docs · GitHub.

For the test endpoint. I followed the instruction mentioned here: selling-partner-api-docs/SellingPartnerApiDeveloperGuide.md at main · amzn/selling-partner-api-docs · GitHub.

If anyone has experienced this before, please drop a comment. If you have resolved it, please share what you’ve done.


#3

Hi,
Did you manage to resolve this? I’m having the same issue, and I haven’t got a clue what’s causing it.


#4

Nevermind, I’ve got it.

I’m using Postman to test this, and I had put the paramaters in the params tab. This didn’t work. Instead I tried adding it as a JSON (set the data type to raw and select JSON from the drop down that appears to the right) and that worked.

{
“grant_type”:“refresh_token”,
“client_id”:"[YOUR_CLIENT_ID]",
“refresh_token”:"[YOUR_REFRESH_TOKEN]",
“client_secret”:"[YOUR_SECRET]"
}