Initialize Token
Initialize a new temporary token
POST /initialize-token
This endpoint creates a temporary token to authenticate the Taiki client CDK.
Your application should store the CLIENT_ID for each unique client. On next sign in, Taiki can automatically retrieve user documents without sign in.
Headers
Name
Value
Description
TAIKI-SECRETYOUR_SECRET_KEYYour application's secret key
TAIKI-USER-IDTAIKI_USER_IDOPTIONAL: If provided, Taiki will use stored user credentials from last sign in. If not provided, Taiki will create a new one.
Body
Name
Type
Description
webhookURL
string
URL that Taiki servers will respond with document data
Response
{
"id": 1,
"TEMPORARY_TOKEN": "0bcfa6cf-2f71-429a-96c3-7f46321e58ff",
"TAIKI_USER_ID": "d71851db-74e4-46b6-a2b5-71bf3dcc25b9" // Empty if TAIKi_USER_ID is provided
}Name
Type
Description
idint
unique ID
TEMPORARY_TOKENstring
Temporary token
TAIKI_USER_IDstring
Taiki's internal user ID to associate the user to their credentials
{
"error": "Invalid request"
}