Establish impersonation session via one-time token
POST
/_torii/auth/session/impersonate
const url = 'https://your-app.torii.so/_torii/auth/session/impersonate';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"token":"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/impersonate \ --header 'Content-Type: application/json' \ --data '{ "token": "example" }'Parameters
Section titled “ Parameters ”Header Parameters
Section titled “Header Parameters ” Host
string
Request Body required
Section titled “Request Body required ” Media type application/json
object
token
required
string
Example generated
{ "token": "example"}Responses
Section titled “ Responses ”OK
Media type application/json
object
Example generated
{}