Skip to main content

Verify Credentials with the DC API on Android (Chrome)

On Android, the W3C Digital Credentials API (DC API) is invoked by Chrome (or another current Chromium browser, such as Edge). When your page calls navigator.credentials.get(), Chrome passes the request to the Android Credential Manager, which presents the system wallet chooser and routes the request to the wallet the holder picks. Credential Manager is an open provider model: any installed app that registers as a digital credential provider can appear in that chooser, so the iGrant.io Data Wallet answers the request alongside whatever else the holder has installed.

This guide follows the same OpenID4VP send and verify flow as the Send and Verify Credential guide, but configures the request for the DC API on Android. Chrome on Android carries both DC API protocols, OpenID4VP over the DC API (responseMode: dc_api) and ISO/IEC 18013-7 Annex C (org-iso-mdoc), so Step 2 below lets you choose the protocol, credential format and response mode rather than fixing them for you. For the same flow on iPhone and iPad, where the choice is narrower, see DC API verification in Safari on iOS.

As a verifier on Android you will:

  • Define the credentials or claims you require in a presentation definition, using a DC API response mode.
  • Hand the request to Chrome, which invokes Credential Manager and the holder's chosen wallet.
  • Receive the verifiable presentation returned by that wallet and validate its integrity and authenticity.
DC API prerequisite on Android:
  1. Chrome 141 or later (or a current Chromium-based Edge), where the Digital Credentials API is on by default. Versions from Chrome 128 need the flag enabled at chrome://flags#web-identity-digital-credentials.
  2. A wallet installed on the Android device that registers with Credential Manager as a digital credential provider.
  3. Google Play services 24.0 or higher for the cross-device flow (a desktop QR code scanned with the phone), plus Bluetooth enabled on both devices for the proximity check.
  4. A Legal Person ID (LPID) credential in your Data Wallet before trialling; see European Business Wallet Owner ID.

Step 1: Get the API Key​

To obtain your API key, sign in to the dashboard and go to Account > Developer APIs > Create API Key (see Get API Keys). Once you have your API key, enter it in the field below and click the Set API Key button to save it for future use.

Signing keys: The requests on this page that name a signing key sign with an x509 key of your organisation: a key with a certificate chain. After you set the API key, the page fills in such a key. To choose another key, click the key label next to a signing key field in a request, for example cryptographicKeyIdentifier. To create a key, attach a certificate or see your keys, follow the key management guide. To add your certificate to the NXD trust list, see trust list registration.

Step 2: Create Presentation Definition (Verifier Admin)​

To create a presentation definition for requesting proof, you can run the code block below using the Run button. Alternatively, you can manually copy the code block and use it in the body of the API request provided here. Select the protocol and transport, DC API version, credential format and response mode in the Request panel below. The request body updates to match your selection. For the W3C Digital Credentials API, choose a DC API response mode. It sets responseMode to "dc_api" in the request body, and dcApiRequestType to "signed" or "unsigned". When using a Signed DC API variant, expectedOrigins is required. It is prefilled with the origin this page is served from, so you can run the request straight away. In your own application, set it to your verifier origin so the wallet can detect replay from a malicious verifier. A Signed variant signs the request with a key of your organisation that has an X.509 certificate chain (client ID prefix x509_hash), and cryptographicKeyIdentifier is filled in with that key. Wallets trust a signed request when the certificate is on a trust list for relying parties (WRPAC): see the key management guide to get a certificate. An Unsigned OpenID4VP request uses the client ID prefix redirect_uri, needs no signing key and must not have expectedOrigins. An ISO 18013-7 (Annex C) request, signed or unsigned, needs exactly one origin in expectedOrigins. An unsigned request carries no verifier identity, so the Data Wallet shows the "Service provider not verified" notice for it.

Request

Protocol & Transport
Version: v1.0
Annex C Request / Response
W3C Working Draft 26 June 2026
IETF SD-JWT VC
direct_post

Response

Tip: Once a presentation definition is created, the presentationDefinitionId can be reused to verify multiple credentials (Step 3). The label must be unique in your organisation: a second run with the same label gets 400 with the description Presentation definition with usage purpose: <label> exists for organisation. Change the label, or reuse the presentationDefinitionId of the first run.

Step 3: Create Verification Request (Verifier/Relying Party)​

Now you can ask a wallet for the credential you defined in Step 2. When Step 2 succeeds it fills the presentationDefinitionId into the request below, and that id tells the wallet which credential to present, so check that it matches the one Step 2 returned before you click Run. A DC API request does not use requestByReference: the response carries the whole request in verificationHistory.dcApiRequest, and the page passes it to the browser. You can also copy the code block and use it in the body of the API request provided here.

Once the request succeeds, the Request Credential button becomes active. Clicking it hands the request to the browser, which invokes the wallet. Step 4 covers what happens next.

Request

Response

Step 4: Send and Receive Verifiable Presentation (Android Device)​

When you click Request Credential, Chrome takes over and hands the request to Credential Manager. What you see next depends on where the wallet is:

  • Wallet on the same Android device: Credential Manager shows the system wallet chooser, listing every installed provider that can satisfy the request. Pick the Data Wallet, and it shows what is being requested and asks you to consent to share it. There is no QR code or camera step in this case.
  • Wallet on another device: if you are browsing on a desktop, Chrome shows a QR code. Scan it with the Android phone (through Google Lens in the Google or Chrome app, or a camera app that supports the code) to pass the request to the wallet there, then consent to share. The two devices complete a Bluetooth proximity check, so keep them close together with Bluetooth on.

Either way, the wallet shows which claims are being requested before you agree to anything. Nothing is shared until you consent.

Once you consent, the credential is sent back to the page and a green Credential shared successfully message appears above the panels. The Request Credential button also changes to Credential Received, and the Response panel shows what was received.

Step 5: Send and Receive Verifiable Presentation (Verifier/Relying Party)​

  • The verifier (relying party) receives the requested credentials. Read them with the Read Verification API. In the response, verificationHistory.isVerified holds the result, verificationHistory.presentation holds the disclosed claims of each credential, and verificationHistory.presentationValidity holds the result of each check.
  • For an OpenID4VP request, verificationHistory.vpToken is an array with one text: the JSON of the VP Token, {"<credential query id>": ["<presentation>"]}. From an SD-JWT VC or an mdoc, the verifier keeps only the claims that the query asks for. Parse the text, then decode each SD-JWT presentation with the JWT Decoder. For an ISO 18013-7 (Annex C) request, vpToken holds the encrypted response as the wallet sent it. The verifier deletes the decryption key after use, so you cannot decrypt it: read the disclosed elements in presentation.
Trust status of the verifier and of the issuer

The holder wallet checks whether the verifier can be matched against a recognised trust list. If the verifier cannot be matched, the Data Wallet shows a "Service provider not verified" warning.

Your verifier checks the issuer of each presented credential. In your verification record, presentationValidity[].<credential query id>.credentialSignerTrustedListCheck holds the trust result for the issuer (for a query with "multiple": true, each credential in credentials[] has its own). For its members, see Trust Check Results. This check runs only when you switch on requiresTrustedCredentialSigner in credentialQueryOptions.<credential query id> of the presentation definition, and it then uses only the trust anchors that you list in acceptedCredentialSigners (see Trust When Verifying). An issuer that is not trusted gives the error PRES_CREDENTIAL_SIGNER_NOT_TRUSTED. With the switch off, no check runs: result is not_applicable and reason.code is not_required. See The "Service provider not verified" notice and Trust in the Wallet Ecosystem.

Try it Yourself​

Watch a short demo of verifying credentials with the Digital Credentials API in Chrome on Android:

Watch the Android DC API demo on YouTube

Where to go next​