Get Started with Amadeus Self-Service APIs

Learn to set up a developer account and generate keys to call the Amadeus Self-Service APIs.

Let's look at the steps required 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 these steps to create an account:

  1. Go to Amadeus for Developers and click the "Register" button at the top right corner.

  2. This redirects us to the "Create an account" page. Fill in the form and agree to the terms of use, then click the "Create account" button.

  3. An automatic confirmation email is sent to the email address we registered. Click the "Activate your account" button given in the email.

  4. This opens up a sign-in page. Click the "Activate your account" button to complete account registration. We now get redirected to the homepage with the account activation confirmation message.

  5. We can now log in to the developer portal with our new credentials. Head to Amadeus for Developers again and click the "Sign In" button at the top right corner.

  6. 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 allows us to get the 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:

  1. Click your username at the top right corner and select "My Self-Service Workspace" from the dropdown menu.

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

  3. We now see the "Create new app" page. Enter "TestApp" for "App name" 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 the 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'll see your "API Key" and "API Secret" under the "App Keys" tab. Copy the "API Key" and "API Secret." Click the "Edit" button in the code widget below and enter the two keys in their respective textboxes. Then, click the "Save" button.

Press + to interact
Get API keys
Get API keys

Generate an access token

Click the "Run" button in the widget below to generate an ACCESS_TOKEN.

Press + to interact
// Defining import libraries here
import fetch from 'node-fetch';
// Define endpoint URL here
const endpointUrl = new URL(`https://test.api.amadeus.com/v1/security/oauth2/token`);
// Define header parameters here
const headerParameters = {
contentType: 'application/json',
};
// Define body parameters here
const bodyParameters = new URLSearchParams({
grant_type: 'client_credentials',
client_id: '{{API_KEY}}',
client_secret: '{{API_SECRET}}'
});
// Setting API call options
const options = {
method: 'POST',
headers: headerParameters,
body: bodyParameters,
};
// Function to make API call
async function generateAccessToken() {
try {
const response = await fetch(endpointUrl, options);
// Printing response
printResponse(response);
} catch (error) {
// Printing error message
printError(error);
}
}
// Calling function to make API call
generateAccessToken();

Note: The ACCESS_TOKEN expires after 30 minutes. Therefore, we'll generate an ACCESS_TOKEN implicitly for each API request.

Now that we have created our developer account, registered a new application, and learned how to generate an ACCESS_TOKEN, we are ready to make our first call to the Amadeus Self-Service APIs!