Skip to main content

Get passkeys

The endpoint provides functionality to get all passkeys for an existing user.

HTTP request

GET https://$instanceId.id.nevis.cloud/nevis/api/v1/users/$userId/passkeys?{queryParameters}

Parameters

ParameterInTypeRequired / OptionalDescription
instanceIdpathstringrequiredThe ID of your Identity Cloud instance
userIdpathstringrequiredThe ID of the user
limitqueryintegeroptionalThe maximum size limit of the token-based pagination results Default 1000
continuationTokenquerystringoptionalThe token to retrieve the next set of the token-based pagination results

Example request

Set the ID of the user.

userId=your-user-id-123
curl --request GET "https://$instanceId.id.nevis.cloud/nevis/api/v1/users/$userId/passkeys?limit=10" \
--header "Authorization: Bearer $accessKey"

HTTP response

On success

HTTP/1.1 200 is returned on success

ParameterTypeDescription
itemsarray of passkeysThe collection of passkeys
_paginationobjectThe pagination object. For more information, see Token-based pagination.

The items array may contain one or more passkeys.

passkey

ParameterTypeDescription
userIdstringThe ID of the user to whom the passkey belongs
passkeyIdstringThe ID of the passkey
aaguidstringA 128-bit identifier indicating the type (for example make and model) of the authenticator
rpIdstringThe domain of the party who uses this authentication for its website
userAgentstringThe client application sends the userAgent when a passkey is registered or used for authentication.
userFriendlyNamestringHuman readable name of the userAgent
stateNameenumThe state of the passkey Values: active,invalid
createdstringThe date of the passkey creation
lastModifiedstringDate when the passkey was last modified
versionintegerThe version of the passkey, used for optimistic locking

Example response

{
"items": [
{
"passkeyId": "9911629d-f212-41d3-94d6-4450a1a12259",
"userId": "1022ae0f-0125-4afc-ab69-c813e1b6b161",
"aaguid": "581bb990-7ea2-49d7-a826-760b1b219581",
"rpId": "your-company.com",
"userAgent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36",
"userFriendlyName": "Chrome on Linux",
"stateName": "active",
"version": 1,
"created": "2023-11-14T07:34:24Z",
"lastModified": "2023-11-14T07:34:24Z"
},
{
"passkeyId": "12ef04ee-2800-41d1-a230-cb55d59204a0",
"userId": "1022ae0f-0125-4afc-ab69-c813e1b6b161",
"aaguid": "d6e77b22-21c7-45a1-a2a0-7c5094de0ef9",
"rpId": "your-company.com",
"userAgent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36",
"userFriendlyName": "Chrome on Linux",
"stateName": "active",
"version": 1,
"created": "2023-11-15T08:34:24Z",
"lastModified": "2023-11-15T08:34:24Z"
}
],
"_pagination": {
"continuationToken": "2471467743000_a721ec6d-dcbf-4bcf-ac15-8ba7bba4135c",
"limit": 1000
}
}

On missing credential

HTTP/1.1 404 is returned if no user is found with the given userId.

User is not found

{
"error": "User with id: 3eb1c041-c76b-4ae8-8307-db29b97d516a cannot be found."
}

On failure

HTTP/1.1 401 is returned if the authorization failed due to an invalid access key.

HTTP/1.1 422 is returned if invalid query parameters were given.

HTTP/1.1 500 is returned if an unexpected error occurred.