Get user ID token

webflow.getIdToken()

Retrieves a JSON Web Token (JWT) that uniquely identifies the current user of your Designer Extension. This ID token contains encoded user information that can be used for authentication and authorization purposes.

Syntax

1webflow.getIdToken(): Promise<string>;

Returns

Promise<String>

A Promise that resolves to the value of the ID Token. The ID token will remain valid for 15 minutes.

Example

1// Get ID Token
2const idToken = await webflow.getIdToken()
3
4// Print ID Token
5console.log(idToken)