OAuth API

Troubleshooting

Troubleshoot problems with OAuth API.

OAuth API

If an OAuth endpoint returns an error message instead of the values you expect, check here for the cause and most likely solution.

Invalid client or client secret
Permalink Get a link to this section

Likely cause
Permalink Get a link to this section

An incorrect application secret was provided in a request to the ObtainToken endpoint.

Solution
Permalink Get a link to this section

Make sure you have copied the entire application secret from the OAuth tab in the application control panel, and that the application ID and application secret you are using are from the same application.

Invalid code
Permalink Get a link to this section

Likely cause
Permalink Get a link to this section

An incorrect authorization code was provided in a request to the ObtainToken endpoint. The two most common causes of this are:

  • The authorization code in your Obtain Token request does not match the authorization code provided by the OAuth UI.

  • The authorization code has expired because it was issued more than 5 minutes before calling Obtain Token..

Solution
Permalink Get a link to this section

Call the ObtainToken endpoint to generate a new authorization code and try again.

Unauthorized
Permalink Get a link to this section

Likely cause
Permalink Get a link to this section

The API request used an incorrect OAuth token.

Solution
Permalink Get a link to this section

Confirm all of the following is true:

  • You are using a valid, unexpired OAuth token.

  • Your OAuth token includes all the permissions required by the endpoint.

  • You are calling the API with HTTPS and including your OAuth token in the header with the following format: Authorization: Bearer ACCESS_TOKEN