Authenticate
Get a bearer token with your API credentials, and keep the token and your client secret on your server.
Send a bearer token on every Taxbit API request. Your backend gets the token with the credentials on the Developer Settings page in the Taxbit Dashboard. Don't send the token to a browser.
Before you begin
- Your
client_idandclient_secretfrom the Developer Settings page in the Taxbit Dashboard. - Your
tenant_idfrom the same page, if one set of credentials covers more than one organization. The API calls an organization a tenant, sotenant_idis your Organization ID. - A server-side environment to hold them. Nothing on this page runs in a browser.
Request a token
Send your client credentials to the token endpoint with the client credentials grant, from a server you control. Include tenant_id when one set of credentials covers more than one organization.
curl -X POST https://api.multi1.enterprise.taxbit.com/v1/oauth/token \
-H "Content-Type: application/x-www-form-urlencoded" \
--data-urlencode "grant_type=client_credentials" \
--data-urlencode "client_id=$TAXBIT_CLIENT_ID" \
--data-urlencode "client_secret=$TAXBIT_CLIENT_SECRET" \
--data-urlencode "tenant_id=$TAXBIT_TENANT_ID"A JSON body with the same fields works too.
{
"access_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6...",
"token_type": "Bearer",
"expires_in": 86400
}
Keep the tenant-scoped token and the client secret on your serverUse the tenant-scoped token only for server-to-server calls, and never send it or your client secret to the browser. The React SDK takes a short-lived account owner token that your backend requests for an existing account owner. How the SDK works covers the token model. If the secret ends up in client code, contact your implementation manager, or Taxbit Support after go-live, to have it rotated.
Use the token
Send it as an Authorization: Bearer header on every request. Tenant-scoped tokens last 24 hours (expires_in: 86400). Cache the token in your service and get a new one before it expires. If a request returns 401, get a new token and retry once.
curl https://api.multi1.enterprise.taxbit.com/v1/filers \
-H "Authorization: Bearer $TOKEN"Examples in these guides use $BASE_URL for https://api.multi1.enterprise.taxbit.com and $TOKEN for this access token.
If the request fails
- 400
invalid_request. The body is missinggrant_type. It must be present and set toclient_credentials, the only supported value. - 401. The
client_idorclient_secretis wrong. Copy both again from Developer Settings. A rotated secret no longer works.
See Errors and rate limits for error formats, rate limits, and which requests are safe to retry.
Parameters
Only the fields used in the request above. The full schema is in the API Reference.
| Field | Type | Required | Description |
|---|---|---|---|
grant_type | string | Required | Always client_credentials. |
client_id | string | Required | Your client identifier, from Developer Settings in the Taxbit Dashboard. |
client_secret | string | Required | Store it in your secret manager, never in source control. |
tenant_id | string | Conditional | Required when one set of credentials covers more than one organization. |
Where to go next
Create account owners and accounts: create an account owner for each of your customers, and their accounts. Your organization needs a default filer first. That page explains how.
Updated 14 days ago
