Redeem a native OAuth ticket for a session token
POST
/_torii/auth/session/establish
const url = 'https://your-app.torii.so/_torii/auth/session/establish';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"ticket":"example","codeVerifier":"example"}'};
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/establish \ --header 'Content-Type: application/json' \ --data '{ "ticket": "example", "codeVerifier": "example" }'Parameters
Section titled “ Parameters ”Header Parameters
Section titled “Header Parameters ” User-Agent
string
Request Body required
Section titled “Request Body required ” Media type application/json
object
ticket
required
string
codeVerifier
required
string
Example generated
{ "ticket": "example", "codeVerifier": "example"}Responses
Section titled “ Responses ”Session token + access token in the body
Media type application/json
object
Example generated
{}