For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Resources
Get started
ReferenceGuidesExamplesChangelog
ReferenceGuidesExamplesChangelog
  • Designer API
    • Introduction
    • Getting Started
    • Webflow CLI
    • Error Handling
    • App Modes
  • Elements
    • Creating & Retrieving Elements
    • Element Properties & Methods
    • Element Types & Methods
  • Styles
    • Managing Style Properties
    • Managing Variable Modes
  • Components
  • Variables & Collections
    • Variable Collections
    • Variables
    • Variable Modes
  • Assets
  • Pages & Folders
  • Utilities
      • Get site information
      • Resize the extension
      • Close the extension
      • Get the current breakpoint
      • Get user ID token
      • Get user's Designer capabilities
      • Get the current Designer mode
      • Check for a Designer mode
      • Get the Designer's pseudo-state
      • Get launch context
      • Get app subscriptions
      • Get theme
      • Get theme styles
    • User Events & Notifications
    • App Intents & Connections
  • Additional Resources
    • API Playground
    • FAQs
LogoLogo
Resources
Get started
On this page
  • webflow.getIdToken()
  • Syntax
  • Returns
  • Example
UtilitiesSite Information & Settings

Get user ID token

Was this page helpful?
Previous

Get user's Designer capabilities

Next
Built with

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.

Authenticating users with the Data API

To decode and verify the token, send a POST request to the Resolve ID Token endpoint. The endpoint will return the user’s details, which you can use to implement permission-based features or personalized experiences in your extension.


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)

Try this example