Canary Speech

GetAuthToken

POST - /v3/auth/tokens/get

Description

Validates a given API Key and issues an access token and refresh token pair when successful. Supports two modes - API Key Authentication and User Authentication.

For API Key Authentication, the Csc-Api-Key header is required.

For User Authentication, the projectId, username, and password parameters are required. If userPool is ommitted, it will be inferred.

Headers

Header KeyDescriptionExample
Csc-Api-Key
The API Key for this message. This is used as primary authentication with the server.
571CCF:SvJtIepDIolHFZMby7OuGPd9kYwJaWJ18Bp5/Q+6yiF...
Content-Type
The content type for this request.
application/json

Body Parameters

NameTypeDescription
userPoolstring
The user pool to authenticate against in User Authentication mode.
projectIduuid
The ID of the project to log the subject into.
usernamestring
The name of the user.
passwordstring
The password of the user.

Successful Response

A successful response

Field NameTypeDescription
accessTokenstring
The Access Token for the authenticated user.
refreshTokenstring
The Refresh Token for the authenticated user.
identityIdsobject

Code Example

Models

userPool

The user pool to authenticate against in User Authentication mode.

EnumTypeDescription
"subjects"string
"users"string

identityIds

NameTypeDescription
clientIduuid
The client ID for the user's authentication context.
projectIduuid
The project ID for the user's authentication context. May be "*" if the context allows access to multiple projects.
subjectIduuid
The subject ID for the user's authentication context. May be "*" if the context allows access to multiple subjects.