v1

latestOpenAPI 3.0.32026-07-23194968.1 KB
Static Tokens

Generate static tokens

Generate one or more static authentication tokens for a given template (product).

Each generated token is created in the UNCLAIMED state and can later be claimed by a user (see the claim endpoint) or used directly by a device for authentication.

Note: to generate the QR code, that is acceptable by the official Blynk mobile applications, use the following format: {token}+{orgId}.

The optional metaMapping array assigns meta field values to each generated token. When provided, its size must equal count, and each entry maps a template meta field id to its value.

Required permissions, when user-scoped authentication is used: MANAGE_STATIC_TOKENS.

post/api/v1/organization/static-tokens/generate

Request body

productIdinteger required

Template (product) ID, that the tokens will be generated for

countinteger required

Number of static tokens to generate

metaMappingobject[]

Optional meta field values applied to each generated token. When provided, the array size must equal count. Each item maps a meta field id to its value.

orgIdinteger

Organization ID (optional). If not provided, the organization, that is associated with the authentication token, will be used.

Response

Static tokens generated successfully

tokenstring required

Static authentication token, that should be used for device claiming

orgIdinteger required

Organization ID, that the token belongs to

productIdinteger required

Template ID, that the token belongs to

deviceTokenstring required

Device token, that should be used on the device for authentication.

createdAtinteger required

Token creation timestamp

status'CLAIMED' | 'UNCLAIMED' required

Static token status

ownerIdinteger

User ID of the claimed device owner

deviceIdinteger

Device ID of the claimed device

claimedOrgIdinteger

Organization ID, that the device was claimed to