I created account on website:
https://developers.amadeus.com
But also on website
From First one I have AMADEUS_API_KEY and AMADEUS_API_SECRET, from second AMADEUS_CUSTOMER_KEY.
I want to use API described there:
https://sandbox.amadeus.com/travel-innovation-sandbox/apis/get/airports/autocomplete
And I can using this code:
require('isomorphic-fetch');
const AMADEUS_CUSTOMER_KEY = '';
fetch(`https://api.sandbox.amadeus.com/v1.2/airports/autocomplete?apikey=${AMADEUS_CUSTOMER_KEY}&term=War`)
.then(r => r.json())
.then(r => { console.log(r)})
.catch(e => console.log(e));
but I cant find place for paste AMADEUS_CUSTOMER_KEY
in amadeus object defined by npm pacakge amadeus
.
What is relation between sandbox and developers subdomains of amadeus.com?
Why I cant use SDK
https://github.com/amadeus4dev/amadeus-node for this?
The Travel Innovation Sandbox (sandbox.amadeus.com) was the first Open API project to connect to Amadeus. This project was a sandbox for startups and independent developers to prototype, you can't have access to production live data or have higher quota.
We are now building a new product named Amadeus for Developers (developers.amadeus.com) that will offer a test environment and a production one. As you can see, we are still in testing phase, it exposes similar APIs as the sandbox and new ones. The sandbox will be decommissioned when we launch officially Amadeus for Developers (in the coming weeks/months).
If you are building a new app, you should use Amadeus for Developers.
Both are providing the autocomplete API:
The autocomplete API is available in Amadeus for Developers: Airport & City Search. The authentication is different between the Travel Innovation Sandbox and Amadeus for Developers that's why one relies on a token that you put as a query parameter of your API call (sandbox) the other one implements the OAuth2 authorization process (Amadeus for Developers).
The Node.js SDK you are trying to use has been developed for Amadeus for Developers, you need to use the API Key and the API Secret you get after creating an account and an application on our portal.
You can follow our Get Started Guide.