> For the complete documentation index, see [llms.txt](https://docs.thebrief.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.thebrief.ai/public-api/rest-api/auth.md).

# Auth

## **Auth Token Request**

This endpoint is used to authenticate and obtain a token to access protected resources. The request should be made using the HTTP POST method.

### **Request**

* Method: POST
* Endpoint: `https://api.thebrief.ai/v1/auth/token`
* Body:
  * `clientId` (text) - The client ID for authentication.
  * `clientSecret` (text) - The client's secret for authentication.

### **Response**

Upon successful authentication, the server responds with a status code of 200 and a JSON object containing the authentication token.

Example response:

```json
{
    "token": "eyJhbGciOiJIUzI1NiIsInR....5cCI6IkpXVCJ9"
}
```

Example payload:

```json
{
    "clientId": "6a38ea97-129d-4171-859c-5535c9f3e4e1",
    "clientSecret": "27eb6a90-1938-474c-8353-1ce4514b4dcd"
}
```

```bash
curl --location 'https://api.thebrief.ai/v1/auth/token' \
--header 'Content-Type: application/json' \
--data '{
    "clientId": "6a38ea97-129d-4171-859c-5535c9f3e4e1",
    "clientSecret": "27eb6a90-1938-474c-8353-1ce4514b4dcd"
}'
```
