Get Access

Learn to set up a developer account and application to call Amadeus Self-Service APIs.

In this lesson, we’ll look at the steps we need to take to call the Amadeus Self-Service APIs.

Set up a developer account

To call the Amadeus Self-Service APIs, we need to register and create a developer account. Follow the steps below to create the account:

Step 1: Go to Amadeus for Developers and click the “Register” button in the top right corner.

Step 2: This redirects us to the “Create an account” page. Fill in the information and click the “Create account” button.

Step 3: An automatic confirmation email is sent to the email address we registered. Click the confirmation link given in the email to finish setting up the account.

Step 4: We can now log in to the developer portal with our new credentials. Head over to Amadeus for Developers once again and click the “Sign In” button in the top right corner.

Step 5: This redirects us to the “Sign in” page. Enter your Email and Password and click the “Login” button.

Create an application

After setting up our developer account and signing in, we have to create an application. This will allow us to get our API keys that we’ll use to generate an ACCESS_TOKEN to make calls to the Amadeus Self-Service APIs. Follow the given steps to create an application and get the API keys:

Step 1: Click your username in the top right corner and select “My Self-Service Workspace” from the dropdown menu.

Step 2: We get redirected to the “My apps” page of the “My Self-Service Workspace”. Click the “Create new app” button.

Step 3: We can see the “Create new app” page. Enter the application name and the other optional information and click the “Create” button.

Get API keys

Now that we have created an app, we can get the API keys that’ll enable us to generate an ACCESS_TOKEN required to make calls to the Amadeus Self-Service APIs.

Upon successful creation of the app, you’ll be redirected to the app page where you will see your “API Key” and “API Secret” under the “App Keys” tab. Copy the “API Key” and “API Secret”. Click the “Edit” button below. Enter the “API Key” in the CLIENT_ID textbox and the “API Secret” in the CLIENT_SECRET textbox. Now, click the “Save” button.

Note: The “API Key” is also called CLIENT_ID and the “API Secret” is also called CLIENT_SECRET. In this course, we’ll use both terms interchangeably.

Generate an access token

Click the “Run” button in the widget below. An ACCESS_TOKEN will be generated and automatically saved for use throughout the course.

import requests
import json
from requests.structures import CaseInsensitiveDict
url = 'https://test.api.amadeus.com/v1/security/oauth2/token'
headers = CaseInsensitiveDict()
headers['Content-Type'] = 'application/x-www-form-urlencoded'
data = 'grant_type=client_credentials&client_id={{CLIENT_ID}}' \
'&client_secret={{CLIENT_SECRET}}'
resp = requests.post(url, headers=headers, data=data)
response = json.loads(resp.text)
print('Client ID: {{CLIENT_ID}}')
print('Client Secret: {{CLIENT_SECRET}}')
print('Access Token:', response['access_token'])

Note: The ACCESS_TOKEN expires after 30 minutes. In case you get the following error while executing any of the API endpoints, head back to this lesson to generate a new ACCESS_TOKEN.

Now that we have created our developer account, registered a new application, and generated an ACCESS_TOKEN, we are ready to go!