---
title: "Login with login credentials"
method: POST
path: "/v2/authorize"
tags: ["Authorize"]
---

# Login with login credentials

`POST /v2/authorize`

## Request

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

Takes login credentials and returns token if successfully validates

## Request body

- Login
  - `username` string, required
  - `password` string, required
  - `changePassword` string: This should be used only when changing the password

## 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
- `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)
