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

# Security

The Tracr API uses OAuth 2.0 authentication. Tracr Support will provide a Client ID and Client Secret during the technical onboarding.

> #### MTLS support
>
> For integrations done before 30/06/2023, please note that Tracr will continue to support mTLS until further notice. New integrations will be provided with OAuth 2.0 credentials only.

## Generate a JWT token

Call `POST https://auth.tracr.com/oauth/token`

{% tabs %}
{% tab title="Request" %}

```json
{
  "client_id":"<client_id>",        
  "client_secret":"<client_secret>",
  "audience":"<api_url>",
  "grant_type":"client_credentials"
}
```

{% endtab %}

{% tab title="Response" %}

```json
{
  "access_token": "<access_token>",
  "token_type": "Bearer"
}
```

{% endtab %}
{% endtabs %}

## Pass the token to the endpoint

To pass the token to the API, provide it in the Authorization header.

```
Authorization: <access_token>
```

This token must be sent in every request to the API.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.tracr.com/api-reference/tracr-api/security.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
