B2Store

Generate the B2Store token

Generates a new B2Store orchestrator token and returns it ONCE. The previous token stops working immediately. Only the sha256 and the last 4 characters are stored. Recorded as entity_event `b2store.token_generated` (last4 only). Requires WorkspaceCreate: root, Owner, SuperAdmin.

POST
/api/v2/app-settings/b2store/token

Authorization

BearerAuthObject
AuthorizationBearer <token>

Machine tokens only: a personal API token or a product robot token (POST /api/v2/products/{uid}/robot-tokens). A session JWT here is 401 — the web app uses the b2t_access cookie.

In: header

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/api/v2/app-settings/b2store/token"
{  "token": "b2s_0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",  "last4": "cdef",  "createdAt": "2019-08-24T14:15:22Z"}
{  "message": {    "error": "Your request was made with invalid credentials."  }}
{  "message": {    "error": "You are not allowed to perform this action."  }}
{  "message": {    "error": "Oops! Something went wrong! Write to administrator. Your Request Id {f1177aee-9a99-42f0-a23f-4dd29fc39b65-672e0df972ccb}"  }}