Integration with Bill.com API
Accept a network invitation that was sent to the organization by a vendor or customer. when the invitation is accepted, the organization is connected with the vendor or customer in the bill network. see [bill network](doc:bill-network) in the guides section for more information, sample requests, and responses.
Sets up multi-factor authentication (mfa) for a user account in the bill api. this endpoint allows users to configure their preferred method of receiving authentication tokens, enhancing account security. it should be used when a user wants to enable mfa or update their existing mfa settings. the setup process requires providing a phone number, selecting between voice calls or text messages for token delivery, and specifying if it's a primary or backup device. this endpoint is crucial for implementing a robust security layer but does not handle the actual authentication process or token validation.
Add a phone number for the currently signed-in user. bill requires the signed-in user to have a linked phone number for initiating risk verification for the organization. you can check whether a phone number has been added for the user with `get /v3/risk-verifications/phone`. after you add a phone number with this endpoint, you can initiate risk verification for the organization with `post /v3/risk-verifications`.
Sign in to your bill developer account. in the response, your api session is created and a bill-generated `sessionid` is available. use the `sessionid` in all subsequent api calls to confirm that you are in a signed-in session. to create an mfa-trusted api session, set `remembermeid` and `device` in addition to the required fields. see [mfa setup](ref:setup) for information about the bill mfa process. you can sign out with `post /v3/logout`. if your api session is inactive for 35 minutes, the session expires and you are automatically signed out. see [api partner login](ref:partnerlogin) for information about the additional permissions you get with the api partner login. **note**: this section is about authentication for working with the bill v3 api. see [authentication with spend & expense api token](doc:authentication-with-api-token) for information about authentication for the spend & expense api endpoints.
The loginasuser endpoint allows partners to authenticate and log in as a specific user within a designated organization in the bill system. this powerful feature enables partners to access and interact with an organization's account on behalf of a particular user, facilitating seamless integration and support. it should be used when a partner needs to perform actions or access information as if they were the specified user within the organization. this endpoint requires careful use and proper authorization, as it effectively allows impersonation of a user. while it supports mfa for enhanced security, partners should ensure they have explicit permission from the organization and user before utilizing this functionality.
Sign out of your bill developer account. in response, the current `sessionid` expires and your api session is terminated. you will be required to sign in again with `/v3/login` before you can make another api call.