---
title: "Authorization Code Exchange"
method: POST
path: "/v2/authorize/sso"
tags: ["Single Sign On - SSO"]
---

# Authorization Code Exchange

`POST /v2/authorize/sso`

## Request

- Base URL: `https://api.alianza.com`
- URL: `https://api.alianza.com/v2/authorize/sso`
- Auth: none required
- TypeScript: <https://skmtc.dev/alianza/apis/alianza-public-api/docs/v2/authorize/sso/post.ts> (a function with typed inputs; its response is checked against the schema)

Pass the SSO response authorization code here to exchange it for an API authorization token

## Query parameters

- `code` string
- `redirect_uri` string

## Response `200`

Successful operation

- LoginTokenX
  - `authToken` string
  - `userId` string
  - `userType` 'AccountUser' | 'EndUser' | 'ManagementUser' | 'AlianzaUser' | 'BusinessLines'
  - `endUserType` 'ADMIN' | 'ADVANCED_ADMIN' | 'BASIC_ADMIN' | 'STANDARD' | 'STANDARD_ADMIN' | 'SUPER_ADMIN'
  - `username` string
  - `firstName` string
  - `lastName` string
  - `emailAddress` string
  - `partitionId` string
  - `partitionName` string
  - `accountId` string
  - `permissions` object
  - `featureToggles` object
  - `mustChangePassword` boolean
  - `subPartitionIds` string[]
  - `tokenSource` string
  - `grantedAuthorities` string[]
  - `pwdHash` string
  - `mustAddEmail` boolean
  - `maxLifeInHours` integer
  - `groupId` string
  - `groupName` string

## Other responses

- `400`: Invalid request parameters
- `401`: Unauthorized
- `404`: Not found

---

[API](https://skmtc.dev/alianza/apis/alianza-public-api.md) - [All operations](https://skmtc.dev/alianza/apis/alianza-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/alianza/apis/alianza-public-api/revisions/7223246c352c?raw)
