API Key
Webauthn (Passkey)
Body
Enum options: ACTIVITY_TYPE_OTP_LOGIN
Timestamp (in milliseconds) of the request, used to verify liveness of user requests.
Unique identifier for a given Organization.
parameters field
parameters.verificationToken
Signed JWT containing a unique id, expiry, verification type, contact
Client-side public key generated by the user, which will be conditionally added to org data based on the validity of the verification token
parameters.expirationSeconds
Expiration window (in seconds) indicating how long the Session is valid for. If not provided, a default of 15 minutes will be used.
parameters.invalidateExisting
Invalidate all other previously generated Login API keys
Response
A successful response returns the following fields:
The activity object containing type, intent, and result
The intent of the activity
activity.intent.otpLoginIntent
The otpLoginIntent objectShow otpLoginIntent details
activity.intent.otpLoginIntent.verificationToken
Signed JWT containing a unique id, expiry, verification type, contact
activity.intent.otpLoginIntent.publicKey
Client-side public key generated by the user, which will be conditionally added to org data based on the validity of the verification token
activity.intent.otpLoginIntent.expirationSeconds
Expiration window (in seconds) indicating how long the Session is valid for. If not provided, a default of 15 minutes will be used.
activity.intent.otpLoginIntent.invalidateExisting
Invalidate all other previously generated Login API keys
The result of the activity
activity.result.otpLoginResult
The otpLoginResult objectShow otpLoginResult details
activity.result.otpLoginResult.session
Signed JWT containing an expiry, public key, session type, user id, and organization id
curl --request POST \
--url https://api.turnkey.com/public/v1/submit/otp_login \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Stamp: <YOUR_API_KEY.YOUR_API_SECRET>" \
--data '{
"type": "ACTIVITY_TYPE_OTP_LOGIN",
"timestampMs": "<string> (e.g. 1746736509954)",
"organizationId": "<string> (Your Organization ID)",
"parameters": {
"verificationToken": "<string>",
"publicKey": "<string>",
"expirationSeconds": "<string>",
"invalidateExisting": true
}
}'
{
"activity": {
"id": "<activity-id>",
"status": "ACTIVITY_STATUS_COMPLETED",
"type": "ACTIVITY_TYPE_OTP_LOGIN",
"organizationId": "<organization-id>",
"timestampMs": "<timestamp> (e.g. 1746736509954)",
"result": {
"activity": {
"type": "<string>",
"intent": {
"otpLoginIntent": {
"verificationToken": "<string>",
"publicKey": "<string>",
"expirationSeconds": "<string>",
"invalidateExisting": true
}
},
"result": {
"otpLoginResult": {
"session": "<string>"
}
}
}
}
}
}