API sandbox sign in
IMPORTANT
This section is about authentication for working with the BILL v3 API. See Authentication with Spend & Expense API token for information about authentication for the Spend & Expense API endpoints.
Use the BILL API to integrate your application with BILL Accounts Receivable (AR) and Accounts Payable (AP) automation capabilities. When you begin testing with the BILL API, you are in the API sandbox environment.
Start by signing in with POST/v3/login
, and then you can perform a set of BILL API operations. This includes adding a vendor, creating a bill, setting up an organization bank account, and submitting a payment.
Prerequisites
Sign in to your BILL developer account with the POST /v3/login
API endpoint. The required fields for signing in are username
, password
, organizationId
, and devKey
.
Sign in credentials | Description |
---|---|
Username | Your username is the email address used to sign in to your BILL developer account. |
Password | Your password is used to sign in to your BILL developer account. |
Organization ID | Your BILL developer account represents your organization in BILL. The organization ID is a unique alphanumeric value that begins with 008 . |
Developer key | Your developer key is used to identify your developer account in your API requests. |
You sign in as an organization user
When you sign in to your BILL developer account, you sign in as a user of your BILL organization. In the API response, userId
is the BILL-generated ID of the signed-in user.
IMPORTANT
A BILL partner can perform partner-level operations, which includes creating an organization, and then creating and managing users for that organization. See BILL partner operations for more information.
If you are interested in becoming a BILL partner, please reach out to your account manager for more information.
Sample request
In this cURL example, you sign in to your BILL developer account in the API sandbox environment with POST /v3/login
. See Development environments for information about the API sandbox and production environments.
NOTE
The
header
value in the v3 API requests iscontent-type: application/json
.
curl --request POST \
--url 'https://gateway.stage.bill.com/connect/v3/login' \
--header 'content-type: application/json' \
--data '{
"username": "{username}",
"password": "{password}",
"organizationId": "{organization_id}",
"devKey": "{developer_key}"
}'
Response
In the response, your API session is created and a generated sessionId
is available. Use the sessionId
in all subsequent API calls to confirm that you are in a signed-in API session. In addition, userId
is the BILL-generated ID of the signed-in user.
{
"sessionId": "{session_id}",
"organizationId": "{organization_id}",
"userId": "{user_id}"
}
See API login in the API reference for more information.
Updated 22 days ago