Authentication with Spend & Expense API token
IMPORTANT
This section is about authentication for working with the BILL Spend & Expense API. See API sandbox sign in for information about authentication for all other BILL v3 API endpoints.
You need an API token to start testing with the BILL Spend & Expense API.
Sandbox API token
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/v3 |
Sandbox web app URL | https://app-dev-sandbox.divvy.co/ |
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 |
---|---|
apiToken | Your API token is used to uniquely identify your developer account in your API requests. |
username | 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. |
password | 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 https://app-dev-sandbox.divvy.co/.
Sample Spend & Expense API request
In this cURL example, you get a list of budgets. The required header field is your apiToken
.
curl --request GET \
--url 'https://gateway.stage.bill.com/connect/v3/spend/budgets' \
--header 'apiToken: {api_token}' \
--header 'Accept: application/json'
Production API token
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/v3 |
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 an API token in the production environment.
IMPORTANT
In the production environment, the Spend & Expense API user must have the
ADMIN
user role to generate an API token.
Updated 23 days ago