> For the complete documentation index, see [llms.txt](https://integrations.drivetrain.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://integrations.drivetrain.ai/integration-guide/integrate-with-drivetrain/others/integrating-with-brex.md).

# Integrating with Brex

[Prerequisites](#prerequisites)\
[Brex Setup](#brex-setup) \
&#x20;   [Generate a user token](#generate-a-user-token)&#x20;

### Prerequisites <a href="#prerequisites" id="prerequisites"></a>

To connect Brex to Drivetrain, you need:

* An active Brex admin account.

### Brex Setup <a href="#brex-setup" id="brex-setup"></a>

Drivetrain uses user/API token to pull data from Brex into Drivetrain’s data warehouse. To generate an API token, please follow the following steps:

#### Generate a user token <a href="#generate-a-user-token" id="generate-a-user-token"></a>

1. Log into the your Brex account.
2. Go to **Settings > Developer**, then click **Create Token**.
3. Enter "Drivetrain Integration" as the **Token Name**.
4. Select the necessary data you want to pull into drivetrain and provide **Read** permission.<br>

   <figure><img src="/files/QBsMGMYBfoskHssITmCk" alt=""><figcaption></figcaption></figure>
5. After selecting **Create token**, click **Allow Access** in the below window.<br>

   <figure><img src="/files/4AxhpFAeva7xhs27uHwV" alt=""><figcaption></figcaption></figure>
6. Once your token is created, store the token in a secure location. You won’t be able to access the token again.

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

{% hint style="info" %}
That’s it! Share your user token with your customer success manager so they can get started!
{% endhint %}


---

# 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://integrations.drivetrain.ai/integration-guide/integrate-with-drivetrain/others/integrating-with-brex.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.
