> ## Documentation Index
> Fetch the complete documentation index at: https://docs.x-mart.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Authentication

<CodeGroup>
  ```bash POST theme={null}
  https://api.artisn.desarrollo-redbrand.com/api/authentication/login
  ```
</CodeGroup>

## Requirements

Access to this API may require prior approval and configuration. It is recommended to review the getting started guides before integration.

## Request Parameters

Requests must be sent in application/json format and should include the following parameters:

| **Key**         | **Type** | **Description**                                                |
| --------------- | -------- | -------------------------------------------------------------- |
| `client_id`     | `string` | Unique identifier for the client application.                  |
| `client_secret` | `string` | Secret key for the client application used for authentication. |
| `grant_type`    | `string` | Grant type used for authentication.                            |

## Example Request

<CodeGroup>
  ```bash Example request theme={null}
  curl --request POST \
    --url https://api.artisn.desarrollo-redbrand.com/api/authentication/login \
    --header 'Content-Type: application/json' \
    --data '{
      "client_id": "<string>",
      "client_secret": "<string>",
      "grant_type": "<string>"
  }'
  ```
</CodeGroup>

## Example Response

<CodeGroup>
  ```bash Example response theme={null}
  {
    "accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"
  }
  ```
</CodeGroup>

## Response Fields

| **Key**       | **Type** | **Description**                                                           |
| ------------- | -------- | ------------------------------------------------------------------------- |
| `accessToken` | `string` | Generated access token, used to authenticate against protected endpoints. |

## Using the Token

The obtained accessToken must be sent in the request header when calling protected endpoints.

# Next Steps

See the [Store Integration Guide](/essentials/stores%20integration%20Guide) for steps to construct your menu.
