Issue customer access token
Issues a secure access token for an OEM customer user. The token grants access to specified permissions and can be configured with custom expiration times (in minutes, hours, or days). Account ID is derived from authorization.
| Header Parameters |
|---|
PubNub-Version string — REQUIREDPossible values: [ |
| Request Body — REQUIRED |
|---|
permissions string[] — REQUIREDPossible values: [ Array of permission strings that define what the customer user can access |
expiresIn stringPossible values: Value must match regular expression Token expiration time in format: digits followed by m (minutes), h (hours), or d (days). Examples: 30m, 2h, 7d. Defaults to 1h if not provided |
externalId string — REQUIREDThe unique external identifier of the customer |
customerUserId string — REQUIREDThe unique identifier for the customer user |
appId number — REQUIREDThe application ID for which the token is being issued |
| Responses | ||||
|---|---|---|---|---|
200Success
| ||||
400Bad Request Error
| ||||
401UnauthorizedError
| ||||
403ForbiddenError
| ||||
404NotFoundError
| ||||
500InternalErrorError
|
PubNub-Version*2026-02-09]permissions*itemsView all values
"business-object:read""business-object:write""business-object:update:activation""business-object:write:config""business-object:update:map""dashboard:read""dashboard:write""decision:read""decision:read:config""decision:read:rule""decision:write""decision:update:activation""decision:write:config""decision:update:rule""metric:read""metric:write"expiresIn"1h"externalId*customerUserId*appId*accessTokenstatusCodeerrorView all values
"BadRequest"messageitemsstatusCodeerrorView all values
"Unauthorized"messageitemsstatusCodeerrorView all values
"Forbidden"messageitemsstatusCodeerrorView all values
"NotFound"messageitemsstatusCodeerrorView all values
"InternalError"messageitems