Get passkey
Get all passkey data for a passkey including the public key. Call this endpoint if you want to extract the public-key component of a passkey for use in another platform or library.
GET https://api.passlock.dev/{tenancyId}/passkeys/{passkeyId} HTTP/1.1Authorization: Bearer {apiKey}Accept: application/jsonHTTP Response:
HTTP/1.1 200 OKContent-Type: application/json
{ "_tag": "Passkey", "id": "sewqeeqx69cr7axut7kat", "userId": "puubifsmidah0f8c0y9bm", "enabled": true, "credential": { "id": "bW9wN3IzenE0enJ5OXVnZXoxOWF4", "userId": "MTVkMTFmdHM1Yzg0bDN0anpieG9w", "username": "jdoe@example.com", "aaguid": "0000-0000-0000-0000", "backedUp": true, "counter": 0, "deviceType": "multiDevice", "transports": ["internal"], "publicKey": "dGhpcy1pcy1hLWNib3ItcHVibGljLWtleQ", "rpId": "example.com" }, "platform": { "icon": "https://api.passlock.dev/aaguid/0000-0000-0000/icon.svg", "name": "Apple Passwords" }, "createdAt": 1770123293, "updatedAt": 1770123293, "lastUsed": 1770123293}import { getPasskey } from "@passlock/server";
const tenancyId = "myTenancyId";const apiKey = "myApiKey";
await getPasskey({ passkeyId, tenancyId, apiKey });Response properties
Section titled “Response properties”| Property | Type | Description |
|---|---|---|
id | string | passkeyId. Not to be confused with the credential.id |
userId | string | Not to be confused with the credential.userId |
enabled | boolean | Passkey enabled |
credential | object | WebAuthn data directly related to the browser’s credential |
platform | object | Details about the authenticator platform |
createdAt | number | Passkey creation date |
updatedAt | number | Passkey update/changed date |
lastUsed | number | Last time the passkey was used for authentication |
credential
Section titled “credential”| Property | Type | Description |
|---|---|---|
id | string | Device native credential ID |
userId | string | Device native credential user ID |
aaguid | string | Global ID representing the platform used |
backedUp | boolean | Backup/sync status |
counter | number | Credential counter. Unreliable |
deviceType | string | singleDevice or multiDevice |
transports | array | Credential transport mechanisms |
publicKey | string | Base64Url encoded public key |
rpId | string | Relying Party ID associated with the credential |
platform
Section titled “platform”| Property | Type | Description |
|---|---|---|
icon | string | URL to an icon representing the authenticator platform |
name | string | Platform name, e.g. Apple Passwords |