Skip to main content

Create JWT token (Server - Server call)

post/v1/token/generate

Creates a JWT token for a user id based on project id / api key (Server - Server call). If user id is not provided in the request, a random `user_id` will be generated

post/v1/token/generate

https://managedservices-prod.rteappbuilder.com/

Request

HEADER

X-API-KEYREQUIRED
TYPE: STRING

API key to be generated via app-builder console


X-Project-ID
TYPE: STRING

Project ID

REQUEST BODY

Generate a token (Server - Server call)

user_id
TYPE: STRING

roles
TYPE: ARRAY
SAMPLE REQUEST
{
"user_id": "user_2049",
"roles": [
"string"
]
}

Responses

success

token
TYPE: STRING

user
TYPE: OBJECT
user_id
TYPE: STRING

user_auid
TYPE: INTEGER

screen_auid
TYPE: INTEGER

roles
TYPE: ARRAY

SAMPLE RESPONSE
{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdXRoZW50aWNhdGlvbl90eXBlIjowLCJhcHBfaWQiOiJhYjFmZTQ5NGFiNjA0ZmRmYWZiZjYzYzY0Yzg2ZDE5NCIsInVzZXJfaWQiOiJqb2UyMzQ2MiIsInByb2plY3RfaWQiOiJkdW1teXByb2plY3QiLCJzcGFjZV9pZCI6Im15X3NlY29uZF9zcGFjZSIsImV4cCI6MTY3OTAzNzA3N30.2vXGdYCZb_j_S-c6KCbSwYE3fzVvg24uKeXT_pIjfOA",
"user": {
"user_id": "c-de34a8cc-73f5-410c-a138-4c665c9c6d4a",
"user_auid": 228863768,
"screen_auid": 211707882,
"roles": [
"role01",
"role02"
]
}
}
Loading...