Build Your Own experience

Obtaining an access token

5min

In order to initiate a conversation session with a Digital Human, your application must first acquire a one time use access token to be used by your website and the uneeq-js SDK to authenticate to the UneeQ Platform.

Document image


Example App

Check out this example Node application which returns a single use token as generated by the UneeQ API server.



Customer JWT token

The process to acquire a one time use token requires JWT encryption (on the client side), and JWT decryption (on the UneeQ server). To achieve this, a shared JWT secret must be possessed by both sides. This JWT secret can be retrieved from the Deploy > Build your own area of UneeQ Creator. Otherwise, our Customer Success team can provide you with this token. Clients may not provide their own.



Connection URL

Region

Connection URL

North America

https://api.us.uneeq.io

Europe

https://api.eu.uneeq.io

Oceania

https://api.au.uneeq.io



Request specification

Get a single use session token
POST
Request
Header Parameters
content-type
required
String
"application/jwt"
workspace
required
String
The workspaceId is the ID which identifies the Persona that you wish to start a conversation with. You can find your personaId within the Personas area of the UneeQ Creator. Otherwise, our Customer Success team can provide you with this ID.
Body Parameters
JWT Signed Request
required
String
JWT token request signed with the customers secret. The token request should have following fields: "sid": string "fm-workspace": string // persona id "fm-custom-data": string // stringified JSON


The token value can then be used by the uneeq-js SDK to instantiate a conversation session with a digital human via initWithToken() method. SDK Methods



Request Body Details

This payload should be encrypted using the customerUneeqSecret:

Field

Type

Description

sid

String

A value defined by you, to help you identify this conversation session in your own platform. Can be a blank string.

fm-custom-data

String

Optional. Any ad-hoc values you wish to be sent in any subsequent from the Platform. Must be stringified JSON.

fm-workspace

String

The workspaceId is the ID which identifies the Persona that you wish to start a conversation with. You can find your personaId within the Personas area of the . Otherwise, our Customer Success team can provide you with this ID.

Node.js
Python
Ruby