---
updatedAt: 2026-04-17T18:21:51.000Z
---

Fetch the complete documentation index at: https://developer.bill.com/llms.txt. Use this file to discover all available pages before exploring further. Append .md to any documentation page URL to get its markdown version.

# Authentication with Spend & Expense API token

> 👍 Important
>
> This section is about authentication to begin testing with the BILL Spend & Expense API. See <Anchor label="API sandbox sign in" target="_blank" href="doc:api-sandbox-sign-in">API sandbox sign in</Anchor> for information about authentication for the BILL AP & AR API endpoints.

You need a Spend & Expense API token to begin testing with the BILL Spend & Expense API.

## Tutorial: BILL Spend & Expense API token generation

<Embed typeOfEmbed="youtube" url="https://www.youtube.com/watch?v=DeU9IN8JJNM" html="%3Ciframe%20class%3D%22embedly-embed%22%20src%3D%22%2F%2Fcdn.embedly.com%2Fwidgets%2Fmedia.html%3Fsrc%3Dhttps%253A%252F%252Fwww.youtube.com%252Fembed%252FDeU9IN8JJNM%26display_name%3DYouTube%26url%3Dhttps%253A%252F%252Fwww.youtube.com%252Fwatch%253Fv%253DDeU9IN8JJNM%26image%3Dhttp%253A%252F%252Fi.ytimg.com%252Fvi%252FDeU9IN8JJNM%252Fhqdefault.jpg%26type%3Dtext%252Fhtml%26schema%3Dyoutube%22%20width%3D%22854%22%20height%3D%22480%22%20scrolling%3D%22no%22%20title%3D%22YouTube%20embed%22%20frameborder%3D%220%22%20allow%3D%22autoplay%3B%20fullscreen%3B%20encrypted-media%3B%20picture-in-picture%3B%22%20allowfullscreen%3D%22true%22%3E%3C%2Fiframe%3E" href="https://www.youtube.com/watch?v=DeU9IN8JJNM" providerUrl="http://youtube.com" providerName="YouTube" />

## Sandbox API token for Spend & Expense

The sandbox environment is a standalone environment and any testing with the API in sandbox does not affect your solution in the production environment. When your API sign up process is complete, you can test with the BILL API in the sandbox environment.

| URL                           | Value                                           |
| :---------------------------- | :---------------------------------------------- |
| Sandbox API base URL          | `https://gateway.stage.bill.com/connect`        |
| Sandbox Webhooks API base URL | `https://gateway.stage.bill.com/connect-events` |
| Sandbox web app URL           | `https://login.stage.us.bill.com/neo/login`     |

> 🚧 Limited access to Spend & Expense webhooks
>
> At this time, the Spend & Expense webhooks are available only in the production environment. We will provide more information when these webhooks are available in the sandbox environment.
>
> This does not affect access to any other webhook in the sandbox environment.

### Sandbox API sign up

Simply fill in the <Anchor label="Sandbox Access Form" target="_blank" href="https://app-dev-bdc-stg.divvy.co/create-sandbox-company">Sandbox Access Form</Anchor> to set up a test company in the sandbox environment. As part of the setup, you receive a set of information for testing in the API sandbox environment.

<Table align={["left","left"]}>
  <thead>
    <tr>
      <th>
        Credential
      </th>

      <th>
        Description
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        `apiToken`
      </td>

      <td>
        Your Spend & Expense API token is used to uniquely identify your developer account in your API requests.
      </td>
    </tr>

    <tr>
      <td>
        `username`
      </td>

      <td>
        Your username is the email address used to sign in to your sandbox developer account. Use this value to sign in to the web app.
      </td>
    </tr>

    <tr>
      <td>
        `password`
      </td>

      <td>
        Your password is used to sign in to your sandbox developer account. Use this value to sign in to the web app.

        After setting up a test company with the Sandbox Access Form, click **Set up password** to complete the flow of creating a password.
      </td>
    </tr>
  </tbody>
</Table>

After you set up your password, you will be directed to complete your setup.

1. Enter **Personal information**. You can enter your date of birth or any date of birth.
2. Enter **Residential address**. You can enter your address or any address.
3. Accept the **Terms and conditions**, and then click **Complete**. You are directed continue your BILL account set up.
4. Click **Get started**.
5. Under **Add a team member**, click **Skip, add member later**. You can add additional users at a later time in the Spend & Expense dashboard.
6. Click **Finish**.

You can sign in to the sandbox web app at a later time with <Anchor label="https://login.stage.us.bill.com/neo/login" target="_blank" href="https://login.stage.us.bill.com/neo/login"><https://login.stage.us.bill.com/neo/login></Anchor>.

### Sample Spend & Expense API request

In this cURL example, we get a list of budgets. The required header value is the Spend & Expense `apiToken`.

```curl Sample Spend & Expense API request
curl --request GET \ 
--url 'https://gateway.stage.bill.com/connect/v3/spend/budgets' \
--header 'apiToken: {se_api_token}' \
--header 'Accept: application/json'
```

## Production API token for Spend & Expense

Your go-live Spend & Expense solution is available to your customers in the production environment.

| URL                              | Value                                          |
| :------------------------------- | :--------------------------------------------- |
| Production API base URL          | `https://gateway.prod.bill.com/connect`        |
| Production Webhooks API base URL | `https://gateway.prod.bill.com/connect-events` |
| Production web app URL           | `https://login.us.bill.com/neo/login`          |

See <Anchor label="Generate an API token in BILL Spend & Expense" target="_blank" href="https://help.bill.com/direct/s/article/6633616">Generate an API token in BILL Spend & Expense</Anchor> in the BILL Help Center for instructions on getting a Spend & Expense API token in the production environment.

> ❗️ Only `ADMIN` users can generate Spend & Expense API tokens
>
> In the production environment, the Spend & Expense API user must have the `ADMIN` user role to generate a Spend & Expense API token.