# Authentication

Authentication is a critical component of Travellers Choice API platform, allowing authorized agents to access and utilize the services and features of our system securely. We use a combination of the agent code, email, and password for the authentication process. Here's how it works:

```
// Live endpoint 
https://secure.mytravellerschoice.com/api

// test endpoint
https://test-api.mytravellerschoice.com/api
```

## Authenticate Endpoint

<mark style="color:green;">`POST`</mark> `https://secure.mytravellerschoice.com/api/login`

We use a combination of the agent code, email, and password for the authentication process.&#x20;

#### Request Body

| Name                                        | Type   | Description |
| ------------------------------------------- | ------ | ----------- |
| agentCode<mark style="color:red;">\*</mark> | String |             |
| email<mark style="color:red;">\*</mark>     | String |             |
| password<mark style="color:red;">\*</mark>  | String |             |

{% tabs %}
{% tab title="200: OK " %}
{ \
&#x20;   "reseller":&#x20;

{\
&#x20;              "email": "<test@gmail.com>",&#x20;

&#x20;              "name": "test",&#x20;

&#x20;              "companyName": "test21",

&#x20;               "agentCode": 10449&#x20;

},

&#x20;"jwtToken": "jwttokendasfasdaseEAWgDSGGEasfdsfds"&#x20;

}
{% endtab %}
{% endtabs %}

{% hint style="info" %}
API Integration is exclusively available to users who are currently registered with My Travellerschoice B2B. Our API allows you to create orders based on your available wallet balance. If you have not yet registered as a B2B user, you can complete the registration process by clicking on the following link <https://b2b.mytravellerschoice.com/register>. If you need any assistance with the integration, please don't hesitate to contact us at <dev@travellerschoice.ae>.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.mytravellerschoice.com/api-integration/authentication.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
