Franpos DevelopersDevelopment

Errors

The API keeps the response shapes it has always had, so existing integrations keep working. OAuth adds a standard JSON shape of its own. Check the status code first, then the body.

OAuth errors

Returned when you authenticate with an access token.

StatusBodyMeaning
401{"error":"invalid_token"}The token is expired, malformed, signed by someone else, revoked, or used from an address the credential does not allow. Request a new one.
403{"error":"insufficient_scope"}The token is valid but lacks a scope the endpoint needs. The response names it.

The WWW-Authenticate header repeats the error, as OAuth clients expect.

Token endpoint errors

StatuserrorMeaning
400invalid_requestA required parameter is missing, or the location is not one the credential may act as.
400unsupported_grant_typeOnly client_credentials is supported.
400invalid_scopeYou asked for a scope the credential does not hold.
401invalid_clientThe client ID or secret is wrong, or the credential is revoked. These cases look identical on purpose.
429temporarily_unavailableToo many requests. Wait for the Retry-After period.
503temporarily_unavailableTokens cannot be issued right now. Try again shortly.

API key errors

Requests made with an API key keep the legacy shapes:

StatusBodyMeaning
403text: Access deniedThe key is missing, wrong, or not allowed from your address.
403text containing JSON: {"message":"..."}The key is valid but the request is refused, for example a usage limit or a location you cannot access.
400text containing JSON: {"message":"..."}The request failed. The message says why.
400{"IsSuccess":false,"Message":"..."}The operation was refused. This is the common shape for validation failures.
404{"Message":"No HTTP resource was found..."}No such endpoint.

Some of these bodies are JSON sent with a text content type. Parse the body rather than relying on the Content-Type header.

See Limits for the quota and rate-limit responses.