Skip to main content

Errors

Errors come from three places, each with its own body.

SourceWhenBody
Token endpointRequesting an access tokenOAuth: error, error_description
API gatewayBefore your request reaches an endpointerror, message
EndpointInside the APIThe response envelope with error.code; problem details for a 500

Token request errors​

HTTPerrorFix
401invalid_clientCheck the assertion against the troubleshooting list.
400invalid_requestSend every required form field, form-encoded.

Gateway errors​

HTTPerrorMeaningFix
401InvalidRequestNo Authorization header.Send Authorization: Bearer <token>.
401InvalidTokenThe token is invalid, expired or not a partner token.Request a new token.
403The token lacks the scope the route needs. Empty body.Request the scope. See Scopes.
429RateLimitExceededToo many requests.Wait for Retry-After. See Rate limits.
503IdentityProviderUnavailableThe token could not be verified right now.Retry after Retry-After, 5 seconds.
{ "error": "InvalidToken", "message": "Partner access token is invalid" }

Endpoint errors​

Endpoints return the response envelope with a machine-readable error.code, and an RFC 7807 problem response with code for a 500. See Errors and Common errors. Each endpoint page lists the codes it can return.

Troubleshooting​

invalid_client​

  • aud must be the token endpoint URL for the same environment, exactly.
  • iss, sub and the client_id form field must all be your client ID.
  • Sign with the private key that matches the registered certificate, using RS256.
  • Use a new jti and a fresh iat for every request. Do not reuse an assertion.
  • Check the server clock. A skewed clock makes a fresh assertion look expired.
  • Check the API Credentials page. Tokens are only issued while the status is Active.

401 InvalidToken on a token that just worked​

The token has expired. Tokens last 5 minutes. Cache the expiry from expires_in and renew 30 seconds early.

403 on a write​

The token was issued without partner.write. Add it to the scope field of the token request.

Contacting support​

Send your client ID, the time of the request in UTC, the full response body, and traceId if there is one. Never send your private key, an assertion or an access token.