b2_delete_key

Deletes the application key specified.

Request

Request HTTP Headers

Authorization

required

An account authorization token, obtained from b2_authorize_account. The token must have the deleteKeys capability.

Request HTTP Message Body Parameters

applicationKeyId

required

The key to delete.

Response

Response HTTP Status 200

Key successfully deleted. The JSON response will contain:

keyName

required

The name assigned when the key was created.

applicationKeyId

required

The ID of the newly created key.

capabilities

required

A list of strings, each one naming a capability the key has. Possibilities are: listKeys, writeKeys, deleteKeys, listBuckets, writeBuckets, deleteBuckets, listFiles, readFiles, shareFiles, writeFiles, and deleteFiles.

accountId

required

The account that this application key is for.

expirationTimestamp

optional

When present, says when this key will expire, in milliseconds since 1970.

bucketId

optional

When present, restricts access to one bucket.

namePrefix

optional

When present, restricts access to files whose names start with the prefix

Response Errors

Key not deleted. If possible the server will return a JSON error structure. Errors include:

status

code

description

400

bad_request

The request had the wrong fields or illegal values. The message returned with the error will describe the problem.

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.

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.