Token — access key to the flespi platform

How to create, use, and manage tokens in flespi.

Flespi token is a key-string used to access the data on the flespi platform via API. As soon as you authorize at the system will create a token for your session that will expire shortly after the session ends. To use a token in API calls you need to create a new one with correct expiration date and access control parameters. With the free account, you can create up to 100 tokens. 

flespi tokens

Types of tokens

Depending on the access control level tokens can be:

  • Standard — a basic token sufficient for working with all Telematics hub features (cannot create other tokens).

  • Master — the admin-level token granting full control over a flespi account including the platform API and creation of other tokens.

  • ACL — a flexible type of token allowing customization of permissions by module and object type.

Advanced details

Token is a 64-byte randomly generated string. The token is automatically deleted at the moment specified in the expire field. Token’s lifetime can be extended via TTL. Timing is explained in this article. You can find more details in the platform/tokens API description.

In HTTP REST API token is used in the “Authorization” header. 

In MQTT API token is used as an MQTT connection Username.

Tokens can be used to set up a complex access control system. You can give token access to only specified REST API calls or MQTT topics using ACL settings.

Also, check our How to create a flespi token video on YouTube.

See also
The structured collection of main flespi MQTT topics grouped by the entity.
Explaining the different methods to change the device behavior in Flespi.