Skip to main content

speechly.identity.v2.IdentityAPI

Speechly Identity API is used for creating access tokens for the Speechly APIs.

Methods

namerequestresponsedescription
LoginLoginRequestLoginResponsePerforms a login of specific Speechly application.
Returns an access token which can be used to access the Speechly API.

Messages

ApplicationScope

Used as the scope in LoginRequest when the access is for a single Speechly application.

Fields

nametypedescription
app_idstringSpeechly application ID. The defined application can be accessed with the returned token.
Required.
config_idstringDefine a specific model configuration to use.
Defaults to the application's latest configuration.

LoginRequest

Top-level message sent by the client for the Login method.

Fields

nametypedescription
device_idstringA unique end-user device identifier.
Must be a UUID.
Required.
applicationApplicationScopeLogin scope application: use the given application context for all
utterances.
projectProjectScopeLogin scope project: define the target application per utterance.
The target applications must be located in the same project.

LoginResponse

Top-level message returned by the server for the Login method.

Fields

nametypedescription
tokenstringAccess token which can used for the Speechly API.
The token is a JSON Web Token and includes all standard claims, as well as
custom ones. The token has expiration, so you should check whether it has
expired before using it. It is safe to cache the token for future use until
its expiration date.
valid_for_suint32Amount of seconds the returned token is valid.
expires_at_epochuint64Token expiration time in seconds after 1970-01-01 ("unix time").
expires_atstringISO-formatted UTC timestamp of the expiration time of the returned token.

ProjectScope

Used as the scope in LoginRequest when access is required for every application in a Speechly project.

Fields

nametypedescription
project_idstringSpeechly project ID. Every application in the same project is accessible with the same token.
Required.