> 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
