Skip to content

Sending Credentials

  • Include Authorization: Bearer <token> on every authenticated request.
  • When you authenticate with a user-scoped token, add X-Nimbu-Site: <site_id> so the API can resolve the site context.
  • Site-scoped tokens already encode the site and do not require the extra header.

Create & Manage Tokens

The OAuth 2.0 endpoints under /oauth2 follow standard flows (authorization code, refresh token, resource-owner password) and return JSON bodies with access_token, expires_in, and optional refresh_token or id_token values.

Token Types

Token typeHow it is issuedRequired headersTypical use cases
User-scopedPersonal access tokens (POST /auth/login, POST /tokens without site_id)Authorization, X-Nimbu-SiteBackoffice automation, multi-site tooling, testing
Site-scopedPOST /tokens with a site_id or via dashboard-generated site keysAuthorizationStorefront integrations scoped to a single site
  • User tokens inherit the permissions of the backoffice user. Provide X-Nimbu-Site for nearly every API call so Nimbu can load the correct site and ACLs. These tokens may see multiple sites if the account has access.
  • Site tokens are already bound to one site. You can omit X-Nimbu-Site because the token resolves the site internally.
  • Both token types surface granted scopes in X-OAuth-Scopes, while X-Accepted-OAuth-Scopes indicates the scopes the endpoint expected.

Working With Scopes

  • Supply the scopes array when creating or updating a token. Each scope string must match the catalogue below.
  • Responses echo your active scopes in X-OAuth-Scopes. If an endpoint fails with 403, compare your scopes to the ones advertised in X-Accepted-OAuth-Scopes.
  • Use separate tokens for automation with different privilege levels to adhere to least privilege.
  • Tokens can be rotated without downtime by creating a new scoped token, updating clients, and then revoking the old credential.

Scope Catalogue

Identity & OpenID

ScopeTitleGrants
openidOpenID - Standard OpenID ClaimAccess to the information it needs to log you in to a new or existing account.
profileOpenID - Profile ClaimAccess to the user profile, including the user id, email and name
emailOpenID - Email ClaimAccess to the email address
full_profileOpenID - full_profile claimAccess to the full user profile, including all fields
publicPublic API AccessThis includes: invoke cloud function
read_userRead-Only Back-end User AccessAccess to the back-end user profile, including the user id, email and name

Read Access

ScopeTitleGrants
read_accountRead Account InfoAccess to account information
read_siteRead-Only Site AccessThis includes: site settings and related settings.
read_channelsRead-Only Channel AccessAll channels and entries, excluding privacy-sensitive channels
read_contentRead-Only Content AccessThis includes: pages, navigation, media, copywriting, uploads, redirects and blogs.
read_couponsRead-Only Coupon AccessThis includes: customer coupons
read_customersRead-Only Customer AccessThis includes: customer accounts, groups, addresses and custom fields.
read_devicesRead-Only Device AccessThis includes: device tokens
read_ordersRead-Only Order AccessAccess to orders, including order items, fulfillment info and order history
read_productsRead-Only Product AccessAccess to products, inventory, collections, types, vendors and custom fields
read_sensitive_channelsRead-Only Privacy-Sensitive Channel AccessAccess to privacy-sensitive channels and entries.
read_themesRead-Only Theme AccessThis includes: theme source code for layouts, templates, snippets and assets.
read_cloudcodeRead-Only Cloud Code AccessAll cloud code sources

Write Access

ScopeTitleGrants
write_siteRead/Write Site AccessThis includes: site settings and related settings.
write_channelsRead/Write Channel AccessAll channels and entries, excluding privacy-sensitive channels
write_contentRead/Write Content AccessThis includes: pages, navigation, media, copywriting, uploads, redirects and blogs.
write_couponsRead/Write Coupon AccessThis includes: customer coupons
write_customersRead/Write Customer AccessThis includes: customer accounts, groups, addresses and custom fields.
write_devicesRead/Write Device AccessThis includes: updating device tokens and sending push notifications
write_ordersRead/Write Order AccessAccess to orders, including order items, fulfillment info and order history
write_productsRead/Write Product AccessAccess to products, inventory, collections, types, vendors and custom fields
write_sensitive_channelsRead/Write Privacy-Sensitive Channel AccessAccess to privacy-sensitive channels and entries.
write_themesRead/Write Theme AccessThis includes: theme source code for layouts, templates, snippets and assets.
write_cloudcodeRead/Write Cloud Code AccessAll cloud code sources

Special

ScopeTitleGrants
skip_confirmationAllow Skip Email ConfirmationAbility to skip email confirmation when creating a new customer account

Troubleshooting

  • 401 Unauthorized — missing or invalid bearer token. Confirm the token is active and not revoked.
  • 403 Forbidden — token is valid but lacks one or more scopes or the site ACL denies the action.
  • 429 Too Many Requests — back off and retry after the time indicated in the rate limit headers.
  • X-OAuth-Scopes echoes what you currently have; X-Accepted-OAuth-Scopes reveals what you still need. Compare them first when debugging access issues.