Authentication with Spend & Expense API token
ImportantThis section is about authentication to begin testing with the BILL Spend & Expense API. See API sandbox sign in 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.
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 Connect Events API base URL | https://gateway.stage.bill.com/connect-events |
Sandbox web app URL | https://app-dev-bdc-stg.divvy.co/ |
Limited access to Spend & Expense webhooksAt 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 Sandbox Access Form 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.
Credential | Description |
---|---|
| Your Spend & Expense API token is used to uniquely identify your developer account in your API requests. |
| 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. |
| 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. |
You can then sign in to the sandbox web app with app-dev-bdc-stg.divvy.co/login.
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 --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 Connect Events API base URL | https://gateway.prod.bill.com/connect-events |
Production web app URL | https://app.divvy.co/ |
See How do I generate an API token in BILL Spend & Expense? in the BILL Help for instructions on getting a Spend & Expense API token in the production environment.
OnlyADMIN
users can generate Spend & Expense API tokensIn the production environment, the Spend & Expense API user must have the
ADMIN
user role to generate a Spend & Expense API token.
Updated 5 days ago