Create write-only keys for Backblaze B2

As far as I remember, you can’t create a write-only key via Backblaze’s dashboard without also giving read access to the key. I want to use this specifically for uploaders in servers, so, if compromized, an attacker can’t read data out of the bucket.

  "apiUrl": "",
  "authorizationToken": ".....",

Replace apiUrl and authorizationToken in the next command:

$ curl https://$apiUrl/b2api/v2/b2_create_key -d '{"capabilities": ["listBuckets","writeFiles"],"keyName":"key-name","accountId":"MASTER_KEY_ID"}' -H 'Authorization: $authorizationToken'
  "accountId": "0f0f0f0f0f0f",
  "applicationKey": "K....",
  "applicationKeyId": "00....",
  "bucketId": null,
  "capabilities": [
  "expirationTimestamp": null,
  "keyName": "key-name",
  "namePrefix": null,
  "options": [

That’s all.