partner_key, partner_secret) and company-level tokens (access_token). You will need to securely manage and store all tokens in your database.
Partner-Level Tokens
Partner-level tokens are issued to Nmbr partners via the developer portal and grant access to create partner-managed companies. Using thepartner_secret you can create a new partner-managed company. In the header of the request you will include the partner_secret using an Authorization HTTP header with the bearer token scheme.
Company-Level Tokens
Company-level tokens are scoped for an individual company and are short-lived to improve security practices. Theaccess_token can be used to make API requests.
After creation of a partner-managed company, you will receive an access_token, expires_in, and the uuid of the created company to make subsequent API calls on behalf of the company. expires_in is the number of minutes in which the access_token will expire.
Using Access Tokens
You can useaccess_tokens to make requests to the Nmbr API. Use the access_token as the Authorization header.
Retrieving new Access Tokens
Access tokens expire 1 hour (60 minutes) after they are issued. If an access token is expired you will receive401 Unauthorized errors. To retrieve a new access token, you will need the company_id along with the partner_secret from the developer portal.
To retrieve your access_token use the POST /token endpoint.
access_token.
expires_in value is provided in minutes from when the access_token was generated.
Revoking Access Tokens
If you need to revoke access tokens, you can do so by calling the DELETE /token endpoint.company_id.
Token Management Recommendations
Access tokens are specific to a partner and company. Care should be taken to avoid token refresh race conditions. It is recommended to have unique constraints and when refreshing tokens, lock the associated row. Example refresh steps:- An access token needs to be refreshed. We know this because the
expires_inis less than current time or an HTTP status of 401 is received from a Nmbr API request - Lock the
auth_tokensrow for the associatedcompany_id - Refresh the access token as instructed above
- Update the
auth_tokensrow with the new access tokens. Theexpires_atshould also be updated to x minutes from the current time. - Unlock the row
- Use the new
access_tokenfor Nmbr API requests - All concurrent processes should use the latest
access_token

