A UI token is a token that's used to authenticate a user in the fetchdocs UI. It's directly connected to an identity. A frontend user needs to authenticate to access and use the fetchdocs UI. Tasks like creating, updating, and deleting connections, via the frontend UI, are only possible with a valid UI token.
For security reasons, the UI token is only valid for a limited time. After the token expires, the client needs to request a new token for the identity. The token is valid for 30 minutes. That's short enough to prevent misuse, but long enough to allow the user to perform tasks in the UI.
To create a UI token, you need to send a POST request to the POST /token endpoint. The request must include the identity_uuid.
You may also want to provide additional information, that controls the behavior of the frontend UI.
The following parameters are available:
| Parameter | Required? | Type | Description |
|---|---|---|---|
identity_uuid |
required | string | The UUID of the identity the token belongs to. |
return_url |
required | string | The URL to which fetchdocs redirects the user after login. fetchdocs adds some additional parameters and signs the URL to avoid manipulation. |
integration_id |
optional | string | Preselect the integration by providing an integration_id. The UI renders directly in the add view and the user isn't able to select a different integration. |
connection_uuid |
optional | string | Preselect the connection by providing its UUID. The UI renders directly in the edit view and the user isn't able to select a different connection or integration. |
The response contains the UI token and the expiration date. The token is a JWT token that's signed by fetchdocs and is valid for 30 minutes.
After fetching the token, you need to redirect the user to the frontend UI, including the token as a query parameter token:
π API reference
For more information about the API endpoint
POST /token, please refer to the API reference.