Skip to content

Passkeys Endpoints

MethodResourcePurpose
GET/webauthn/passkeys/:idRetrieve passkey info
DELETE/webauthn/passkeys/:idRevoke a passkey

GET /webauthn/passkeys/:id

Retrieves information about a passkey identified by its id.

Request

ParamTypeMandatoryDescription
:idPathYesThe unique identifier for a passkey

Response

interface Passkey {
alg: string; // The passkey algorithm (e.g., P-256)
created_at: number; // The Unix timestamp when this passkey was created
last_use: number; // The Unix timestamp when this passkey was last used
created_with: string[]; // A list of authentication methods used to generate this passkey
}

Response Codes

CodeDescription
200Request was successful.
404The passkey does not exist or has already been revoked.

Usage

const response = await fetch(`https://api.nopwd.io/v0/webauthn/passkeys/${id}`);
const passkey = await response.json();

DELETE /webauthn/passkeys/:id

Revokes a passkey identified by its id.

Request

ParamTypeMandatoryDescription
:idPathYesThe unique identifier for a passkey

Response Codes

CodeDescription
200Request was successful.
404The passkey does not exist or has already been revoked.

Usage

await fetch(`https://api.nopwd.io/v0/webauthn/passkeys/${id}`, {
method: "DELETE",
});