Getting started overview

Integrating with Amadeus for Developers involves a series of steps designed to provide access to its extensive API catalog. The process generally includes creating a developer account, generating API keys, and making an initial authenticated request to ensure proper setup. This guide outlines the necessary actions to get an Amadeus for Developers integration operational quickly. The platform offers APIs for various travel-related functionalities, including flight search, hotel booking, and car rental services, supported by a self-service portal for managing applications and credentials, as detailed in the official Amadeus for Developers learning resources.

Before beginning, it's beneficial to understand the typical API workflow:

  1. Account Creation: Register for a developer account on the Amadeus for Developers portal.
  2. Application Setup: Create an application within your account to generate unique API credentials (API Key and API Secret).
  3. Authentication: Use your API credentials to obtain an access token. Most Amadeus APIs employ the OAuth 2.0 client credentials flow for server-to-server communication, requiring an access token to be sent with each API request.
  4. Make API Requests: Call the desired API endpoints using the obtained access token.

This page focuses on these initial steps to facilitate a rapid setup.

Create an account and get keys

To access Amadeus for Developers APIs, you must first register for a developer account and then create an application to obtain your API keys. These keys are fundamental for authenticating your requests.

Step 1: Register for a developer account

Navigate to the Amadeus for Developers registration page. Follow the prompts to create your account. This typically involves providing an email address, setting a password, and agreeing to the terms of service. You may need to verify your email address before proceeding.

Step 2: Create an application

After logging into your newly created account, access the developer console or dashboard. Look for an option to 'Create a new application' or 'My Apps'. When prompted, provide a name for your application (e.g., "My First Travel App"). This action will generate two crucial pieces of information:

  • Client ID (API Key): A public identifier for your application.
  • Client Secret (API Secret): A confidential key that should be kept secure. Do not expose this in client-side code.

These credentials will be displayed immediately after application creation. Make sure to copy them and store them securely, as the Client Secret may not be retrievable later.

Quick Reference: Account and Keys

Step What to Do Where
1. Register Account Sign up with email and password Amadeus for Developers Registration
2. Create Application Name your application to generate credentials Amadeus Developer Console (after login)
3. Retrieve Credentials Copy Client ID (API Key) and Client Secret Application details page in console

Your first request

With your Client ID and Client Secret, you can now make your first authenticated request. The Amadeus for Developers APIs use Bearer token authentication, requiring you to first obtain an access token.

Step 1: Get an Access Token

Send a POST request to the Amadeus authentication endpoint. This request uses your Client ID and Client Secret to generate a temporary access token.

curl -X POST "https://test.api.amadeus.com/v1/security/oauth2/token"
     -H "Content-Type: application/x-www-form-urlencoded"
     -d "grant_type=client_credentials&client_id=YOUR_CLIENT_ID&client_secret=YOUR_CLIENT_SECRET"

Replace YOUR_CLIENT_ID and YOUR_CLIENT_SECRET with your actual credentials. The response will be a JSON object containing your access_token and its expires_in duration (typically in seconds). Store this access_token, as it will be used in subsequent API calls.

{
  "type": "Bearer",
  "username": "api_test",
  "application_name": "YOUR_APP_NAME",
  "client_id": "YOUR_CLIENT_ID",
  "token_type": "Bearer",
  "access_token": "YOUR_ACCESS_TOKEN_STRING",
  "expires_in": 3600,
  "state": "approved",
  "scope": "" 
}

Step 2: Make a Test API Call

Once you have your access_token, you can use it to call an Amadeus API. A common first request is to the Flight Search API, specifically the City Search endpoint, as it requires minimal parameters.

For example, to search for cities:

curl -X GET "https://test.api.amadeus.com/v1/reference-data/locations?subType=CITY&keyword=PARIS"
     -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Replace YOUR_ACCESS_TOKEN with the token obtained in the previous step. The response should be a JSON object containing city data, confirming your authentication and API access are working.

{
  "data": [
    {
      "type": "location",
      "subType": "CITY",
      "name": "PARIS",
      "detailedName": "PARIS (FR)",
      "id": "PAR",
      // ... more data
    }
  ],
  "meta": {
    "count": 1
  }
}

Using an SDK (Optional)

Amadeus for Developers provides SDKs for multiple languages, including Python and Node.js. Using an SDK can simplify the authentication and request process by abstracting the HTTP calls. Here's an example using the Python SDK:

from amadeus import Client, ResponseError

amadeus = Client(
    client_id='YOUR_CLIENT_ID',
    client_secret='YOUR_CLIENT_SECRET'
)

try:
    response = amadeus.reference_data.locations.get(subType='CITY', keyword='PARIS')
    print(response.data)
except ResponseError as error:
    print(error)

Install the Python SDK first: pip install amadeus.

Common next steps

After successfully making your first API call, consider these common next steps to further your integration:

  • Explore More APIs: Review the Amadeus API catalog to understand the full range of available services, such as Flight Booking, Hotel Search, and Car Rental APIs.
  • Implement Error Handling: Develop robust error handling in your application to manage API responses, rate limits, and other potential issues.
  • Manage Access Tokens: Implement logic to refresh access tokens before they expire. Tokens usually have a limited lifespan (e.g., 1 hour).
  • Switch to Production Environment: After testing, you'll need to request access to the production environment and obtain new production API keys. The base URL will change from test.api.amadeus.com to api.amadeus.com. Refer to the Amadeus for Developers API Endpoints documentation for details on environments.
  • Review Pricing and Quotas: Understand the Amadeus for Developers pricing model and API quotas to plan for scaling and avoid unexpected costs. The free tier includes up to 2,000 self-service transactions per month.
  • Use Webhooks: For certain asynchronous events, consider implementing webhooks to receive real-time notifications, as described in the Amadeus for Developers learning section.

Troubleshooting the first call

Encountering issues during your first API call is common. Here are some troubleshooting tips:

  • Incorrect Client ID/Secret: Double-check that you've correctly copied and pasted your CLIENT_ID and CLIENT_SECRET from your Amadeus application page. Typos are a common cause of authentication failures.
  • Expired Access Token: Access tokens have a limited lifespan. If your token has expired (typically 3600 seconds or 1 hour), you'll need to request a new one before making further API calls. The response will usually indicate an authentication error.
  • Incorrect Endpoint URL: Ensure you are using the correct base URL for the test environment (https://test.api.amadeus.com). Using the production URL with test keys, or vice-versa, will result in errors. Consult the Amadeus API Endpoints reference.
  • Missing Authorization Header: Ensure that your API calls include the Authorization: Bearer YOUR_ACCESS_TOKEN header. Without it, the API server cannot authenticate your request.
  • Invalid Request Body/Parameters: Verify that the request body for obtaining the access token (grant_type=client_credentials&client_id=...&client_secret=...) is correctly formatted as application/x-www-form-urlencoded. For subsequent API calls, check that all required query parameters or JSON body fields are present and correctly formatted according to the specific API's documentation.
  • Rate Limiting: While less likely on a first call, be aware that Amadeus APIs have rate limits. Repeated failed attempts or high-frequency requests can temporarily block your access. Refer to the Amadeus for Developers documentation on rate limits.
  • Network Issues: Confirm that your local environment has an active internet connection and no firewalls are blocking outgoing requests to https://test.api.amadeus.com.
  • Consult Documentation: The Amadeus for Developers learning documentation and API reference provide detailed information on specific API requirements and error codes.