Skip to content

API Keys

Terminal window
rcommerce api-key create --name "My Integration" --scopes "products:read,orders:write"

Output:

Key: ak_1a2b3c4d.x9y8z7w6v5u4t3s2r1q0p9o8n7m6l5k4

The key is shown only once. Store it securely.

API keys use a two-part format: prefix.secret

  • Prefix (8+ characters): identifies the key, stored in plaintext
  • Secret (32+ characters): the actual secret, hashed before storage

Scopes follow the pattern resource:action:

ScopeAccess
products:readRead products
products:writeCreate/update products
orders:readRead orders
orders:writeCreate/update orders
customers:readRead customers
customers:writeCreate/update customers
carts:readRead carts
carts:writeCreate/update carts
readRead access to all resources
writeRead + write access to all resources
adminFull admin access
PresetScopes
read_onlyread
read_writewrite
adminadmin
customerproducts:read, carts:read/write, orders:read/write, customers:read/write
Terminal window
rcommerce api-key list
Terminal window
rcommerce api-key revoke <prefix> --reason "No longer needed"
Terminal window
rcommerce api-key delete <prefix>
Terminal window
rcommerce api-key update <prefix> --scopes "read"