Common client and server errors
Amadeus for Developers Self-Service APIs use HTTP status codes to communicate whether a request has been successfully processed.
Types of errors
There two main types of errors are:
- Client: typically occur when the request has not been properly built.
- Server: occur when there is an issue on the server side.
Client errors
If your API request is invalid, you will receive a Client Error
response with an HTTP 4xx
status code. The body of the response will match the format defined in our swagger
schema and provide details about the error.
Authorization errors
400 Bad request - Unsupported grant type
Occurs when using a grant type other than client credentials
. For more information, read our Authorization Guide.
401 Unauthorized - Invalid access token
Occurs when the access token provided in the Authorization header is expired or not longer valid. You must generate a new token.
401 Unauthorized - Invalid client
Occurs when the client credentials have an invalid format and are not recognized.
401 Unauthorized - Invalid HTTP header
The Authorization header is missing or its format invalid, e.g. the required word "Bearer" is wrongly spelled or not present at all in the Authorization header in an API request.
401 Unauthorized – Access token expired
The access token sent by the client is expired. Access tokens are only valid for 30 minutes. To ease the generation of access tokens you can use our SDKs.
401 Unauthorized – Access token revoked
The access token has been revoked. Please generate a new one.
401 Unauthorized –API revoked
The API credentials have been revoked. This could be because we found it searchable in a public repository, in this case you can generate new keys in your Self-Service workspace. Or it could be that you have unpaid bills and we revoked your access, if that is the case please contact support.
401 Unauthorized – Invalid API key
The API key used is invalid. Please check for spaces in the end and make sure you are using the correct key and case URL.
Data Format Errors
400 Bad request - Invalid format
Occurs when an input query parameter is incorrect. In the example below, the Airport & City Search API returns an error because the location parameter is not in the expected IATA standard.
403 Forbidden
The HTTP protocol is used instead of HTTPS when making the API call. Or you are attempting to reach an endpoint which requires additional permission.
Too Many Requests Errors
429 Too many requests
Too many requests are sent in the given timeframe. Please check our rate limits and adjust accordingly for the targeted environment and API.
429 Quota limit exceeded
The number of free transactions allowed in test has been reached for this month. Please consider moving your app to production or wait next month to keep using the APIs.
Resource Errors
404 Not found - Resource not found
Occurs when the endpoint or URL does not exist. Make sure you are calling a valid endpoint and that there are no spelling errors.
Server errors
If an error occurs during the execution of your request, you will receive
a Server error
resonse with an HTTP 5xx
status code. The body will match the defined error format, allowing your application to read it and display an appropriate message to the client. It may also contain debugging information which you can submit to us to further investigate the error.
500 Internal error