List user TOTP devices
Retrieve a list of TOTP devices for a user.
GET
/appid-{appId}/recipe/totp/device/listAuthorization
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.
Query parameters
userIdstringrequiredHeader parameters
ridstringcdi-versionstringX.Y of the X.Y.Z CDI version.
Responses
200Retrives all TOTP devices
One of:
object
statusstatusOKrequiredAllowed:
OKdevicesobject[]List of TOTP devices
Show propertiesHide properties
Array of
objectnamestringName of the TOTP device
periodnumberTime period in seconds for TOTP code generation
skewnumberTime skew in seconds for TOTP validation
verifiedbooleanWhether the device has been verified
400error code 400
string401error code 401
string404error code 404
string500error code 500
stringTry it
Server
Authorization
Parameters
Request
curl -X GET "/appid-{appId}/recipe/totp/device/list?userId=string" \
-H "api-key: YOUR_API_KEY"const response = await fetch("/appid-{appId}/recipe/totp/device/list?userId=string", {
method: "GET",
headers: {
"api-key": "YOUR_API_KEY"
}
});import requests
response = requests.get(
"/appid-{appId}/recipe/totp/device/list?userId=string",
headers={
"api-key": "YOUR_API_KEY"
},
)Response
{
"status": "OK",
"devices": [
{
"name": "string",
"period": 0,
"skew": 0,
"verified": true
}
]
}"string""Invalid API key""Not Found""Internal Error"