Partner 2FA / Start authentication challenge
/v1/auth/challengeCreates a login challenge for an enrolled identity. Present challengeUrl to the user, then poll until approved.
Bearer clientId:clientSecret — Server secret required.
Content-Type: application/json · required
externalUserIdstringrequirednoncestringnullableprojectIdstring (uuid)requiredreturnUrlstringnullableOptional URL; origin must match project callback URL origin
201 Challenge created
challengeIdstringrequiredchallengeUrlstringrequiredexpiresInintegerrequiredpollAfterMsintegerrequiredreturnUrlstringnullablestatusstringrequired404 Not enrolled
detailsobjecterrorstringrequiredmessagestringrequired| Error | HTTP | Meaning | Fix |
|---|---|---|---|
not_enrolled | 404 | No active identity for this user | Run enrollment before starting a challenge Diagnose → |
@keyra/typescript-sdk: startAuthentication(externalUserId, { nonce?, returnUrl? })ie.keyra:keyra-java-sdk: startAuthentication(...)curl -X POST "https://auth.keyra.ie/v1/auth/challenge" \
-H "Authorization: Bearer CLIENT_ID:CLIENT_SECRET" \
-H "Content-Type: application/json" \
-d '{"projectId":"11111111-1111-1111-1111-111111111111","externalUserId":"user_12345"}'Response
{
"challengeId": "string",
"challengeUrl": "string",
"expiresIn": 0,
"pollAfterMs": 0,
"status": "string",
"returnUrl": "https://example.com/app/return"
}