Switch the active session (multi-session)
POST
/_torii/auth/session/activate
const url = 'https://your-app.toriiauth.eu/_torii/auth/session/activate';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"sessionId":"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.toriiauth.eu/_torii/auth/session/activate \ --header 'Content-Type: application/json' \ --data '{ "sessionId": "example" }'Rotates the target session’s credential and re-issues the session cookie for it, making that account the active one on this browser. Authenticated by the client cookie; 403 when multi-session is disabled for the environment, 404 when the session is not on this client or no longer active.
Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”Origin
string
Host
string
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
sessionId
required
string
Examplegenerated
{ "sessionId": "example"}Responses
Section titled “Responses”OK
Media typeapplication/json
object
Examplegenerated
{}