Skip to content
Torii docs

Mint a token from a named JWT template

POST
/_torii/auth/session/token
curl --request POST \
--url 'https://your-app.torii.so/_torii/auth/session/token?template=example'

GetToken({ template }): mints a token for the authenticated user from the named JWT template (404 if no such template exists). Bearer-authenticated like the other authenticated /_torii endpoints. The standard claims and the template’s lifetime override apply just as for the session token. It is a one-off token for a third-party service; it does not replace the session token.

template
required
string

OK

Media type application/json
object
Example generated
{}