Skip to main content
POST
/
v2
/
login
/
token-exchange
Token Exchange
curl --request POST \
  --url https://api.studio.prisme.ai/v2/login/token-exchange \
  --header 'Content-Type: application/json' \
  --data '
{
  "provider": "<string>",
  "subject_token": "<string>"
}
'
{
  "firstName": "<string>",
  "sessionId": "<string>",
  "email": "foo@prisme.ai",
  "language": "<string>",
  "authData": {
    "anonymous": {},
    "prismeai": {},
    "azure": {
      "id": "<string>",
      "firstName": "<string>",
      "lastName": "<string>",
      "email": "<string>",
      "language": "<unknown>"
    }
  },
  "meta": {},
  "orgSlugs": [
    "<string>"
  ],
  "platformRole": "<string>",
  "groupAcls": {},
  "createdAt": "<string>",
  "updatedAt": "<string>",
  "updatedBy": "<string>",
  "lastName": "<string>",
  "photo": "<string>",
  "groups": [
    "<string>"
  ],
  "membership": {
    "roleSlug": "<string>",
    "joinedAt": "<string>",
    "invitedAt": "<string>",
    "invitedBy": "<string>"
  },
  "id": "<string>",
  "expires": "<string>"
}

Body

application/json
provider
string
required

Slug of the configured external auth provider.

subject_token
string
required

The id_token (JWT) issued by the external provider.

subject_token_type
string

Token type, per RFC 8693. Only urn:ietf:params:oauth:token-type:id_token is supported.

grant_type
string

Optional, for RFC 8693 compatibility. When provided must be urn:ietf:params:oauth:grant-type:token-exchange.

expiresAfter
number

Optional session expiration in seconds

Response

Success Response

firstName
string
required

Name

sessionId
string
required
email
string
Example:

"foo@prisme.ai"

status
enum<string>
Available options:
pending,
validated,
deactivated
language
string
authData
object
mfa
enum<string>
Available options:
totp,
none,
*
meta
object
orgSlugs
string[]
platformRole
string
groupAcls
object
createdAt
string
updatedAt
string
updatedBy
string
lastName
string

Name

photo
string

Profile picture URL

groups
string[]
membership
object

Organization membership info (only returned when includeOrgMembership is set)

id
string

Unique id

expires
string