Home / Market / verified email

verified email

Provides a complete workflow for implementing verified email retrieval on Android Credential Manager API. Use this skill to integrate a secure, OTP-less email verification flow into an Android app. This skill solves the problem of high-friction sign-up processes by leveraging cryptographically verified credentials from trusted providers like Google.

skill★ 108452066 dlskills.shApache-2.0Install in CosmosUpstream Source

Documentation & Preview

--- name: verified-email description: Provides a complete workflow for implementing verified email retrieval on Android Credential Manager API. Use this skill to integrate a secure, OTP-less email verification flow into an Android app. This skill solves the problem of high-friction sign-up processes by leveraging cryptographically verified credentials from trusted providers like Google. license: Complete terms in LICENSE.txt metadata: author: Google LLC last-updated: '2026-09-16' keywords:

---

Fundamentals

Standards \& Examples

Requirements

Use Cases

Email verification is applicable for the following use cases:

Limitations \& Nuances

Scope \& Pre-requisites

Crucial : This skill focuses exclusively on the Android client-side integration . It does not implement the app's server-side cryptographic validation logic. Server-side validation of the returned credential is required for security and must be implemented in your backend.

Codebase exploration for Use Cases

Get started with the following queries in project source code to find relevant screens with different use cases to implement verified email:

Identifying Integration Points

To implement this feature effectively, you must first locate the relevant flows in your codebase. To initiate, start with the following strategies to cater to different use cases using verified email:

1. Search for Navigation Routes

If your app uses Navigation, search for routes or destinations related to authentication:

Look for:

2. Locate Authentication ViewModels

Find the business logic handling user attributes and account creation, account recovery:

3. Find instances of reauthentication for sensitive actions

For reauthentication use cases, find areas where users perform sensitive actions:

Important pointers for Implementation

Overview

This guide describes how to implement verified email retrieval using the Digital Credentials Verifier API through an OpenID for Verifiable Presentations (OpenID4VP) request.

Add dependencies

In your app's build.gradle file, add the following dependencies for Credential Manager:

Kotlin

dependencies {
    implementation("androidx.credentials:credentials:1.7.0-alpha03")
    implementation("androidx.credentials:credentials-play-services-auth:1.7.0-alpha03")
}

Groovy

dependencies {
    implementation "androidx.credentials:credentials:1.7.0-alpha03"
    implementation "androidx.credentials:credentials-play-services-auth:1.7.0-alpha03"
}

Initialize Credential Manager

Use your app or activity context to create a CredentialManager object.

// Use your app or activity context to instantiate a client instance of // CredentialManager. private val credentialManager = CredentialManager.create(context)

Construct the Digital Credential request

To request a verified email, construct a GetCredentialRequest containing a GetDigitalCredentialOption. This option requires a requestJson string formatted as an OpenID for Verifiable Presentations (OpenID4VP) request.

The OpenID4VP request JSON must follow a specific structure. The current providers support a JSON structure with an outer "digital": {"requests": [...]} wrapper.

val nonce = generateSecureRandomNonce()

// This request follows the OpenID4VP spec val openId4vpRequest = """ { "requests": [ { "protocol": "openid4vp-v1-unsigned", "data": { "response_type": "vp_token", "response_mode": "dc_api", "nonce": "$nonce", "dcql_query": { "credentials": [ { "id": "user_info_query", "format": "dc+sd-jwt", "meta": { "vct_values": ["UserInfoCredential"] }, "claims": [ {"path": ["email"]}, {"path": ["name"]}, {"path": ["given_name"]}, {"path": ["family_name"]}, {"path": ["picture"]}, {"path": ["hd"]}, {"path": ["email_verified"]} ] } ] } } } ] } """

val getDigitalCredentialOption = GetDigitalCredentialOption(requestJson = openId4vpRequest) val request = GetCredentialRequest(listOf(getDigitalCredentialOption))

The request contains the following key information:

claims being requested (email_verified). You can request other claims to determine the level of verification. A few possible claims are as follows:

> [!NOTE] > Note: If email_verified is true and hd is empty in the response, it implies that the account is an authorized Google Account. Google does not issue verifiable credentials for Google Workspace Accounts. However, the hd field is present in verifiable credentials issued for non-workspace accounts. You are encouraged to implement handling this field to future-proof your app. If the email is non-@gmail.com, Google verified this email when the Google Account was created, but there is no freshness claim. Therefore, for non-Google emails, you should consider an additional challenge, such as an OTP, to verify the user. To understand the schema of the credential and the specific rules for validating fields like email_verified, refer to the Google > Identity guides.

each request. This is critical for security, as it prevents replay attacks.

credential that contains user attributes. Including this in the request is pivotal to distinguish the email verification use case.

Next, wrap the openId4vpRequest JSON in a GetDigitalCredentialOption, create a GetCredentialRequest, and call getCredential().

> [!NOTE] > Note: The hd and email_verified fields are hidden from users in Credential Manager's built-in UI. You cannot make a request with only these hidden fields- in case of such requests, the response is the GetCredentialCancellationException.

Present the request to the user

Present the user with the request, using the Credential Manager built-in UI.

coroutineScope { try { // Requesting Digital Credential from user... val result = credentialManager.getCredential(activity, request)

when (val credential = result.credential) { is DigitalCredential -> { val responseJsonString = credential.credentialJson

// Successfully received digital credential response.

// Next, parse this response and send it to your server. // ... }

else -> { // handle Unexpected State() - Up to the developer } } } catch (e: Exception) { // handle exceptions - Up to the developer } }

> [!NOTE] > Note: There is no equivalent of Sign in with Google's preferImmediatelyAvailableCredentials for Digital Credentials. If no verifiable credential is found (for example, no eligible account on device), the user will be shown a "No options available" or similar system screen.

Parse the response on the client

> [!WARNING] > Warning: From August 2026, the response JSON) format has been updated to strictly match the W3C standards. It contains data and `protocol