POST
/
user-tokens
curl --request POST \
  --url https://api.sandbox.goteal.co/user-tokens \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: <api-key>' \
  --data '{
  "user_id": "95a0e70b-fe02-4f47-aef9-2efff279df71"
}'
{
  "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoiOTVhMGU3MGItZmUwMi00ZjQ3LWFlZjktMmVmZmYyNzlkZjcxIiwiaWF0IjoxNTE2MjM5MDIyfQ.4S5J",
  "webapp_link": "https://api.sandbox.goteal.co/r/ZwgQkNEMZ4QDkQ",
  "created_at": "2019-05-17T00:00:00.000Z"
}

Authorizations

X-API-KEY
string
header
required

Body

application/json
user_id
string

The id of the user

Example:

"95a0e70b-fe02-4f47-aef9-2efff279df71"

Response

201
application/json
Created
token
string
required

The token to be used in subsequent requests

Example:

"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoiOTVhMGU3MGItZmUwMi00ZjQ3LWFlZjktMmVmZmYyNzlkZjcxIiwiaWF0IjoxNTE2MjM5MDIyfQ.4S5J"

URL of the teal webapp with short version of token. Ignore if not utilising webapp.

Example:

"https://api.sandbox.goteal.co/r/ZwgQkNEMZ4QDkQ"

created_at
string
required
Example:

"2019-05-17T00:00:00.000Z"