POST
/
tokens
/
generate

Tokens are used to interact with the Flare API. They can be generated using an API key provided via the Authorization header.

API tokens expire after 1 hour.

The endpoint returns an API token via the response body, but also via cookies which can then be used in future HTTP requests.

For more information about authentication, see the API Authentication Guide

.

Auth Headers

Authorization
string
required

Your Flare API key.

Parameters

tenant_id
number

The tenant you want to authenticate to.

When unspecified, the API token will be generated for your default tenant.

Response Fields

token
string

The generated API token.

refresh_token_exp
number

Unix timestamp of the expiration of the refresh token.

(The refresh token is returned in cookies).