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/ |
Required information
As part of the API sign up process, 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. |
Generating an API token
See How do I generate an API token in BILL Spend & Expense? in the BILL Help for instructions on getting an API token. The instructions are the same for both the sandbox and production environment.
IMPORTANT
A Spend & Expense API user must have the
ADMIN
user role to create an API token.
Sample Spend & Expense API request
In this cURL example, you get a list of budgets. The required header field is your apiToken
.
curl --request POST \
--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.
Updated 22 days ago