Skip to main content
GET
/
v1
/
webauthn
/
credentials
/
{user_id}
/
{domain}
C#
// GET /v1/webauthn/credentials/{user_id}/{domain}
const stytch = require('stytch');

const client = new stytch.Client({
  project_id: '${projectId}',
  secret: '${secret}',
});

const params = {
  user_id: "${userId}",
  domain: "${exampleDomain}",
};

client.WebAuthn.ListCredentials(params)
  .then(resp => { console.log(resp) })
  .catch(err => { console.log(err) });
{
  "credentials": [
    {
      "credential_id": "<string>",
      "webauthn_registration_id": "<string>",
      "type": "<string>",
      "public_key": "<string>"
    }
  ],
  "request_id": "<string>",
  "status_code": 123
}
List the public key credentials of the WebAuthn Registrations or Passkeys registered to a specific User.

Authorizations

Authorization
string
header
required

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Path Parameters

user_id
string
required

The user_id of an active user the Passkey or WebAuthn registration should be tied to.

domain
string
required

The domain for Passkeys or WebAuthn. Defaults to window.location.hostname.

Response

Successful response

credentials
object[]
required

A list of WebAuthn credential objects.

request_id
string
required

Globally unique UUID that is returned with every API call. This value is important to log for debugging purposes; we may ask for this value to help identify a specific API call when helping you debug an issue.

status_code
integer<int32>
required

The HTTP status code of the response. Stytch follows standard HTTP response status code patterns, e.g. 2XX values equate to success, 3XX values are redirects, 4XX are client errors, and 5XX are server errors.