List passwordless codes
Lists all active passwordless codes of the user
GET
/appid-{appId}/{tenantId}/recipe/signinup/codesAuthorization
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.
Query parameters
emailstringUse this parameter to get information about all devices associated with an email (without the other query params)
phoneNumberphoneNumberUse this parameter to get information about all devices associated with a phoneNumber (without the other query params)
deviceIddeviceIdUse this parameter to get information about a single device (without the other query params)
preAuthSessionIdpreAuthSessionIdUse this parameter to get information about a single device (without the other query params)
Header parameters
ridstringcdi-versionstringX.Y of the X.Y.Z CDI version.
Responses
200List of all active passwordless codes of the user
statusstatusOKAllowed:
OKdevicesobject[]Show propertiesHide properties
Array of
objectpreAuthSessionIdpreAuthSessionIdA random identifier that can be used to identify the login attempt/device.
failedCodeInputAttemptCountnumberemailemailphoneNumberphoneNumbercodesobject[]Show propertiesHide properties
Array of
objectcodeIdcodeIdUniquely identifies a code
timeCreatedtimeCreatedcodeLifetimecodeLifetimeThe maximum lifetime of the code in milliseconds
400error code 400
string401error code 401
string404error code 404
string500error code 500
stringTry it
Server
Authorization
Parameters
Request
curl -X GET "/appid-{appId}/public/recipe/signinup/codes" \
-H "api-key: YOUR_API_KEY"const response = await fetch("/appid-{appId}/public/recipe/signinup/codes", {
method: "GET",
headers: {
"api-key": "YOUR_API_KEY"
}
});import requests
response = requests.get(
"/appid-{appId}/public/recipe/signinup/codes",
headers={
"api-key": "YOUR_API_KEY"
},
)Response
{
"status": "OK",
"devices": [
{
"preAuthSessionId": "kFmkPQEAJtACiT2w/K8fndEuNm+XozJXSZSlWEr+iGs=",
"failedCodeInputAttemptCount": 2,
"email": "johndoe@gmail.com",
"phoneNumber": "+14155552671",
"codes": [
{
"codeId": "QZ0Mx9zG9cfqNXmPI0I/67r9bpKghUBDQZeMMbayi+I=",
"timeCreated": 1637262633029,
"codeLifetime": 900000
}
]
}
]
}"string""Invalid API key""Not Found""Internal Error"