Getting error 500 response from the API

Hi there,

I`m trying to request an Access Token from this address https://api.infusionsoft.com/token
vie Postman and when i Send the POST request i get Internal Server Error… What could be the reason for that?

Also if I re-send the request several times, maybe on the 10th time i get new response an it is
{
“error”: “invalid_grant”,
“error_description”: “Authorization code is invalid”
}

But this is after a lot of clicking…

However this is what i send in Postman

The error message is correct, it’s an invalid authorization code. That code is way too long to be valid. It should be 24 characters in length.

Pick OAuth 2.0 from the Authoriztion Type dropdown. Then click Get New Token. You need to then enter The proper data for Authorization URL, client_id, client_secret, access token url, etc. This will then set the obtained access token as an Authorization Header on the current request. Notice the request URL on the original request is to one of the REST API endpoints ‘/contacts’ not /token. Postman will handle the OAuth 2.0 hand shake for you just set the proper values on the Get New Access Token Prompt.

1 Like

Thanks!

This is awesome. However I need to configure my own API to make same request as the Postman, but https://signin.infusionsoft.com/app/oauth/authorize returns me very long and obviously not valid Code in HTML. Should be decoded somehow?

I follow the steps in the documentation and this is the Code i get returned from URL:
https://signin.infusionsoft.com/app/oauth/authorize

Post you payloads minus any secrets.

Sorry my bad! It works!