Source Code Bundles
Used to log in to the B2 API. Returns an authorization token that can be used for account-level operations, and a URL that should be used as the base URL for subsequent API calls.
You can use either the master application key or a normal application key.
You'll find the master key on the B2 Cloud Storage Buckets page on the web site. When using the master key, the "key id" is your account ID, and the "application key" is the one you got from the web site.
Normal application keys come from the b2_create_key call. When using one of them, the "key id" and "application key" are the ones returned when you created the key.
Request HTTP Headers
Request HTTP Message Body Parameters
This request has no parameters. The Authorization header is all that is needed.
Response HTTP Status 200
Authorization succeeded. The JSON response will contain:
The identifier for the account.
An authorization token to use with all calls, other than b2_authorize_account, that need an Authorization header. This authorization token is valid for at most 24 hours.
An object (see below) containing the capabilities of this auth token, and any restrictions on using it.
The base URL to use for all API calls except for uploading and downloading files.
The base URL to use for downloading files.
The recommended size for each part of a large file. We recommend using this part size for optimal upload performance.
For very large files, you may need to use a larger size to stay within the limit of 10,000 parts per large file.
Currently, the value returned is always 100,000,000, but we recommend that you write your code to get the number here, rather than use a hard-coded constant. See Large Files.
The smallest possible size of a part of a large file (except the last one). This is smaller than the recommendedPartSize. If you use it, you may find that it takes longer overall to upload a large file.
DEPRECATED: This field will always have the same value
A list of strings, each one naming a capability the key has.
When present, access is restricted to one bucket.
When present, access is restricted to files whose names start with the prefix
If possible the server will return a JSON error structure. Errors include: