> For the complete documentation index, see [llms.txt](https://docs.phptravels.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.phptravels.com/modules/flights/amadeus-self-service.md).

# Amadeus Self Service

Amadeus Self-Service flights setup for PHPTRAVELS: create an Amadeus app, copy the client ID and secret into the module and run your first flight search.

This guide works for both amadeus self service and amadeus entreprise API&#x20;

to obtain the API keys and perform your first search please follow the below video&#x20;

for any questions please send email to <info@phptravels.com>

{% embed url="<https://www.youtube.com/watch?t=3s&v=Er2bUbzgI1U>" %}

### Step-by-step summary of the video

Amadeus is a global distribution system that supplies airline fares through APIs. The PHPTRAVELS Amadeus flights module uses two Amadeus APIs: **Flight Offers Search** fills your results page and **Flight Create Orders** turns the chosen offer into a booking. The same steps apply to Amadeus Self-Service keys and Amadeus Enterprise keys; Enterprise has its own guide at [Amadeus Entreprise](https://docs.phptravels.com/modules/flights/amadeus-entreprise). The Amadeus connector is part of the PHPTRAVELS Enterprise plan.

### 1. Get your Amadeus keys

1. Register at the Amadeus developer portal and verify your email.
2. Open **My Apps** and click **Create New App**.
3. Enable **Flight Offers Search**, and **Flight Create Orders** if you want bookings.
4. Copy the app's client ID (API key) and client secret. These first keys are for the test environment only.

### 2. Enter them in PHPTRAVELS

1. Log in to your admin panel at `yourdomain.com/admin`.
2. Open **Settings > Modules** and select the Amadeus flights module.
3. In the credential fields enter: **c1** = `client_credentials` (grant type), **c2** = client ID, **c3** = client secret.
4. Set **Dev mode** to **Development** while you use test keys, then save.

### 3. Test your first search

* Search a busy route on your website, for example London to New York.
* Look for the **Amadeus logo under the Book now button**. It shows the fare came from Amadeus.
* If Flight Create Orders is enabled, place a test booking and check it in the admin.

### 4. Go live

Apply for production access in your Amadeus account (company details, website URL, commercial terms). When Amadeus approves you, replace the test keys with production keys and set **Dev mode** to **Production**.

### Common errors

* **Wrong credentials** -- client ID and secret swapped or copied with spaces.
* **Environment mismatch** -- test keys with Dev mode on Production, or the reverse.
* **Inactive API** -- Flight Offers Search or Flight Create Orders is not enabled on your Amadeus app.

Questions? Email <info@phptravels.com> or [submit a ticket](https://docs.phptravels.com/support/submit-ticket).
