light-mode-image
Learn
Functions

requestCredentials

Requests credentials based on the provided options.

Requests credentials based on the provided options.

An optional state correlation reference can be supplied via RequestCredentialsOptions to link the session to a record in your own system. When provided it must be a non-empty string, and is carried through the presentation session and echoed back on the result: on RequestCredentialsResponse for cross-device flows, and via handleRedirectCallback() for same-device flows. Because state is transmitted in plain text on the wallet-facing request URI and stored in session records, it must not contain personally identifiable information (PII), credentials, or other sensitive data. When omitted, the OpenID4VP state claim falls back to the internal sessionId and no state is returned.

Signature

function requestCredentials(
  options: RequestCredentialsOptions
): Promise<Result<RequestCredentialsResponse, RequestCredentialsError>>

Parameters

Returns

Promise<Result<RequestCredentialsResponse, RequestCredentialsError>>

A promise that resolves to a result containing either the requested credentials or an error.

How would you rate this page?

On this page