List the public key credentials of the WebAuthn Registrations or Passkeys registered to a specific User.
List WebAuthn Credentials
GET
https://test.stytch.com/v1/webauthn/credentials/{user_id}/{domain}Path parameters
user_id* string
domain* string
Response fields
status_code int
request_id string
credentials array[object]
const stytch = require('stytch');
const client = new stytch.Client({
project_id: 'PROJECT_ID',
secret: 'SECRET',
});
const params = {
user_id: "user-test-16d9ba61-97a1-4ba4-9720-b03761dc50c6",
domain: "example.com",
};
client.webauthn.credentials(params)
.then(resp => { console.log(resp) })
.catch(err => { console.log(err) });
RESPONSE
200
{
"credentials": [
{
"credential_id": "AAbb55jpkgGGAA4AFvmBBA==",
"type": "public-key",
"webauthn_registration_id": "webauthn-registration-test-5c44cc6a-8af7-48d6-8da7-ea821342f5a6",
"public_key": "pQECAbBbCCCCdDdd12E34ffGhhIjKLMN0PqrSTuVWxyZ+AbBbCCCCdDdd12E34ffGhhIjKLMN0PqrSTuVWxyZ12c+/AbcdE1z123Xc1=",
}
],
"request_id": "request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141",
"status_code": 200
}