Create a new subject token.
Create a new subject token for the use of impersonating the user.
POST
/api/subject-tokens
curl \
-X POST https://[tenant_id].logto.app/api/subject-tokens \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"userId":"string","context":{}}'
Request examples
{
"userId": "string",
"context": {}
}
Response examples (201)
{
"subjectToken": "string",
"expiresIn": 42.0
}