getToken()
Retrieves a token for a JWT Template that is defined in the Clerk Dashboard on the JWT Templates page.
- Name
sessionId
- Type
string
- Description
The ID of the session to retrieve a token for.
- Name
template
- Type
string
- Description
The name of the JWT template from the Clerk Dashboard to generate a new token from.
For example: 'firebase', 'grafbase', or your custom template's name.
Backend API (BAPI) endpoint
This method in the SDK is a wrapper around the BAPI endpoint POST/sessions/{session_id}/tokens/{template_name}
. See the BAPI reference for more information.
Feedback
Last updated on