Check passwordless code
Tries to check if the passed userInputCode+deviceId combo or the linkCode is valid
POST
/appid-{appId}/{tenantId}/recipe/signinup/code/checkAuthorization
api-keyAPI key · headerrequiredThe core service API token. If you are using a self-hosted core service and you have not generated a token, you can omit the header.
Path parameters
tenantIdstringThe tenant against which the request is made. If left empty, the default tenant will be used.
Header parameters
ridstringcdi-versionstringX.Y of the X.Y.Z CDI version.
Request body
application/jsonOne of:
object
preAuthSessionIdpreAuthSessionIdrequiredA random identifier that can be used to identify the login attempt/device.
linkCodelinkCoderequiredURL-safe string that can be used to authenticate the user, without the deviceId
object
preAuthSessionIdpreAuthSessionIdrequiredA random identifier that can be used to identify the login attempt/device.
deviceIddeviceIdrequiredA random identifier that should be stored on the device that started the sign in process.
userInputCodeuserInputCoderequiredThis can be used to authenticate the user when paired with the deviceId
Responses
200Indicates success with the status property
One of:
object
statusstatusOKAllowed:
OKconsumedDeviceobjectInformation about the consumed device
Show propertiesHide properties
preAuthSessionIdpreAuthSessionIdrequiredA random identifier that can be used to identify the login attempt/device.
failedCodeInputAttemptCountnumberrequiredNumber of failed code input attempts
emailemailphoneNumberphoneNumberobject
statusstringAllowed:
INCORRECT_USER_INPUT_CODE_ERROREXPIRED_USER_INPUT_CODE_ERRORfailedCodeInputAttemptCountnumberNumber of failed code input attempts
maximumCodeInputAttemptsnumberMaximum allowed code input attempts
object
statusstringAllowed:
RESTART_FLOW_ERROR400error code 400
string401error code 401
string404error code 404
string500error code 500
stringTry it
Server
Authorization
Parameters
Bodyapplication/json
Request
curl -X POST "/appid-{appId}/public/recipe/signinup/code/check" \
-H "api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"preAuthSessionId": "kFmkPQEAJtACiT2w/K8fndEuNm+XozJXSZSlWEr+iGs=",
"linkCode": "b10lbT_SnDC4flA6Fn7pE5TtG5k5NfigLef4QMBeGA8"
}'const response = await fetch("/appid-{appId}/public/recipe/signinup/code/check", {
method: "POST",
headers: {
"api-key": "YOUR_API_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"preAuthSessionId": "kFmkPQEAJtACiT2w/K8fndEuNm+XozJXSZSlWEr+iGs=",
"linkCode": "b10lbT_SnDC4flA6Fn7pE5TtG5k5NfigLef4QMBeGA8"
})
});import requests
response = requests.post(
"/appid-{appId}/public/recipe/signinup/code/check",
headers={
"api-key": "YOUR_API_KEY",
"Content-Type": "application/json"
},
json={
"preAuthSessionId": "kFmkPQEAJtACiT2w/K8fndEuNm+XozJXSZSlWEr+iGs=",
"linkCode": "b10lbT_SnDC4flA6Fn7pE5TtG5k5NfigLef4QMBeGA8"
},
)Response
{
"status": "OK",
"consumedDevice": {
"preAuthSessionId": "kFmkPQEAJtACiT2w/K8fndEuNm+XozJXSZSlWEr+iGs=",
"failedCodeInputAttemptCount": 2,
"email": "[email protected]",
"phoneNumber": "+14155552671"
}
}"string""Invalid API key""Not Found""Internal Error"