Mint a token from a named JWT template
POST
/_torii/auth/session/token
const url = 'https://your-app.torii.so/_torii/auth/session/token?template=example';const options = {method: 'POST'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Parameters
Section titled “ Parameters ”Query Parameters
Section titled “Query Parameters ” template
required
string
Responses
Section titled “ Responses ”OK
Media type application/json
object
Example generated
{}