Skip to content

Create a Token

This chapter aims to provide hands-on examples on how to create a token.

Example request

Use the values described in the Authorization-section to construct the Create Token request:


curl \
  -H 'content-type: application/json' \
  -d "{

Example response

  "access_token": "eyJ0eXAiOiUSJ9.eyJpc3MiOiJdGlhbHMifQ.MJpcxLfyOt",
  "token_type": "Bearer",
  "expires_in": 86400

The token, or JWT (JSON Web Token), is the value of the access_token-property in the response. Your can now use it by passing it in the Authorization-header of any subsequent API requests. The expires_in-property represents the number of seconds your token is valid, usually the value corresponds to 24 hours. When this time has elapsed you will need to create a new token.

E.g. when using the Operations API to list Devices:

export TOKEN=eyJ0eXAiOiUSJ9.eyJpc3MiOiJdGlhbHMifQ.MJpcxLfyOt
export PARTITION=1bcaafc3-d4d3-43e1-ab64-89d8518d5951

curl -H "Authorization: Bearer $TOKEN" "$PARTITION/devices"


Your token is valid for a limited time and your application will need to refresh it at regular intervals.


Make sure to store your token in a safe place, never share it or store it in source control. Anyone with access to your token can access the system on your behalf.


Connect and Collaborate with Industrial Professionals and Join the Community!

Click to load comments