# Requesting API Authorization with X-API-Key

This feature allows users to apply for an X-API-Key bound to a Client through a self-service\
process, and use the key to authorize API calls after obtaining it via email.

## Creating an X-API-Key <a href="#toc191998789" id="toc191998789"></a>

1. Log in to the Admin Console, and go to **Client Management** > **API Client**.
2. Click on the  ![](/files/rW1hANDh8KVCFUWmaj5y)(**Security**) icon of the client to which the X-API-Key will be bound to access   \
   the security page.

<figure><img src="/files/N6RIuSbdUvVV4CqLt7Ve" alt=""><figcaption></figcaption></figure>

3. Select the **X-API-Key Settings** tab, and click **Add X-Api-Key** to access the creation page.

<figure><img src="/files/RWPFrt6It9ZrWQ61zEEs" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/DMZV6IdEhKRCzOORPbDt" alt=""><figcaption></figcaption></figure>

4. Fill in the required fields or make selections as instructed below.
   * **Alias**<mark style="color:red;">**\***</mark>**:** An identifiable name for the key.
   * **Expiry Date**<mark style="color:red;">**\***</mark>**:** The date until which the API remains valid.
   * **Authorization Group**<mark style="color:red;">**\***</mark>**:** Click **Add** to access the list page, select the authorization group for the X-Api-Key, and click **Confirm** to save and exit.

<figure><img src="/files/u71v3tCFkAwpkfMPROTX" alt=""><figcaption></figcaption></figure>

5. Click **Add X-API-Key** to complete the creation, and review the displayed information to confirm the key has been successfully created.

<figure><img src="/files/TjlUj8EwJObamm2jOYg5" alt=""><figcaption></figcaption></figure>

## Calling APIs with the X-API-Key <a href="#toc191998790" id="toc191998790"></a>

1. Log in to the Admin Console, and go to **API Management** > **API List**.
2. Locate the authorized API and click on the ![](/files/cC9Xy4znHn3RjosqDYWP) icon to access the **API Test** page.

<figure><img src="/files/VUH74AfV4hIfoQs4R1XC" alt=""><figcaption></figcaption></figure>

3. Fill in the data or make selections as instructed below.
   * **Authorization**: Select **No Auth**.
   * **Request Header**: Set the **Key** as *x-api-key*, and the **Value** as the issued X-API-Key.
4. Click **Test** to call the API and verify that the X-API-Key successfully authorizes access to the API.

<figure><img src="/files/1pKOPLOfeI2HjnC4uBmK" alt=""><figcaption></figcaption></figure>


---

# 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.tpi.dev/most-common-use-cases/requesting-api-authorization-with-x-api-key.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.
