This API request is now being described as a
GET request and not a
POST request, as was the case in previous versions of our documentation.
We made this update because we believe that an API call that retrieves data and does not alter state is more accurately represented as a GET request.
You may still make a POST request to this endpoint by simply submitting a JSON-formatted request body containing the parameters, with
Content-Type set to
Lists application keys associated with an account
An account authorization token, obtained from b2_authorize_account.
The token must have the
The ID of your account.
The maximum number of keys to return in the response. Default is 100, maximum is 10000.
NOTE: b2_list_keys is a Class C transaction (see Pricing). The maximum number of keys returned per transaction is 1000. If you set
maxKeyCount to more than 1000 and more than 1000 are returned, the call will be billed as multiple transactions, as if you had made requests in a loop asking for 1000 at a time. For example: if you set
maxKeyCount to 10000 and 3123 keys are returned, you will be billed for 4 Class C transactions.
The first key to return. Used when a query hits the
maxKeyCount, and you want to get more. Set to the value returned as the nextApplicationKeyId in the previous query.
The request succeeded.
The response headers include the Content-Type that was specified when the file was uploaded. They also include the X-Bz-FileName and X-Bz-Content-Sha1 headers, plus X-Bz-Info-* headers for any custom file info that was provided with the upload. The X-Bz-FileName uses percent-encoding, as if it were a URL parameter.
An array of key objects (see below).
The account that this application key is for.
The ID of the newly created key.
When present, restricts access to one bucket.
A list of strings, each one naming a capability the key has.
When present, says when this key will expire, in milliseconds since 1970.
The name assigned when the key was created.
When present, restricts access to files whose names start with the prefix.
When present and set to
s3, the key can be used to sign requests to the S3 Compatible API.
Set if there are more keys beyond the ones that were returned. Pass this value the startApplicationKeyId in the next query to continue listing keys.
Note that this value may not be a valid application key ID, but can still be used as the starting point for the next query.
|400||bad_bucket_id||The requested bucket ID does not match an existing bucket.|
|400||bad_request||The request had the wrong fields or illegal values. The message returned with the error will describe the problem.|
|400||cannot_delete_non_empty_bucket||A bucket must be empty before it can be deleted. To delete this bucket, first remove all of the files in the bucket, then try the delete operation again.|
The numeric HTTP status code. Always matches the status in the HTTP response.
A single-identifier code that identifies the error.
A human-readable message, in English, saying what went wrong.
|401||bad_auth_token||The auth token used is not valid. Call b2_authorize_account again to either get a new one, or an error message describing the problem.|
|401||expired_auth_token||The auth token used has expired. Call b2_authorize_account again to get a new one.|
|401||unauthorized||The auth token used is valid, but does not authorize this call with these parameters. The capabilities of an auth token are determined by the application key used with b2_authorize_account.|
|403||transaction_cap_exceeded||Transaction cap exceeded. To increase your cap, sign in to your B2 Cloud Storage account online. Then select the Caps & Alerts link in the B2 Cloud Storage section of the sidebar.|