- Print
- DarkLight
Authorize
- Print
- DarkLight
Availability
Early Access: July 1, 2026
Early Access is gated; contact the Backblaze Sales team for access.
Limited Availability: July 1, 2026
This API is available only to customers with access to the Backblaze Enterprise Web Console. For more information, contact the Backblaze Sales team.
Exchange Service Principal Key credentials for a short-lived bearer token
Callers invoke this endpoint with the credentialId and secret of a Service Principal Key using HTTP Basic authentication. The response includes an authToken for use with all subsequent Organizations API requests.
The actual session duration is the minimum of the remaining lifetime of the key and the supplied (or default) duration.
HTTP Basic authentication using the credentialId and secret of a Service Principal Key. Used only by the /orgs/v1/authorize endpoint to obtain a bearer token.
Requested session duration in seconds. Default 3600 (1 hour), maximum 43200 (12 hours).
The request succeeded.
{
"apiUrl": "https://api.backblazeb2.com",
"asOf": "d20260602_m192621",
"authToken": "5_910-efc6e9a0-5eb8-11f1-a520-b9cd4f26c19a_1780428381590_01c4c98a_Xu-nGx_x1iZ0NmBMYwU.4s0vWYYL5Xsx-I=",
"challenge": null,
"clientToken": "ct_1_944d0f9f99408d46aa9750a3d894c48c197452f6_igooMo3NzHnQkcr6RWrZi57uMtU=",
"credentialProblem": null,
"idleTimeout": "d20260603_m072621",
"info": {},
"isAuthenticated": true,
"scope": [
{
"scopeType": "orgServicePrincipal",
"servicePrincipalKeyName": "accounts/942733365851/servicePrincipals/2/keys/019e6a8a-678e-7298-9167-4bd65df2f272"
}
],
"sessionExpires": "d20260602_m202600"
}Base URL for subsequent Organizations API calls.
Opaque server-side timestamp.
Bearer token to use in the Authorization header on subsequent requests.
Opaque server-side timestamp at which the session becomes idle.
Opaque server-side timestamp at which the session expires.
The request was not authenticated.
| HTTP Status | Code | Description |
|---|---|---|
| 401 | UNAUTHORIZED | Missing, expired, or invalid bearer token. |
Opaque correlation identifier matching the Request-Id response header. Include in support requests.
Numeric error code.
Human-readable description of the error.
Reserved for structured, non-sensitive diagnostic information related to the error condition.
The request was rate-limited.
| HTTP Status | Code | Description |
|---|---|---|
| 429 | TOO_MANY_REQUESTS | Rate limit exceeded. Use exponential backoff. |
Opaque correlation identifier matching the Request-Id response header. Include in support requests.
Numeric error code.
Human-readable description of the error.
Reserved for structured, non-sensitive diagnostic information related to the error condition.
The server encountered an unexpected condition.
| HTTP Status | Code | Description |
|---|---|---|
| 500 | INTERNAL | Unexpected server error. Include the requestId when contacting support. |
Opaque correlation identifier matching the Request-Id response header. Include in support requests.
Numeric error code.
Human-readable description of the error.
Reserved for structured, non-sensitive diagnostic information related to the error condition.