/v1/verifier/dc_sessions
API Key
Create a DC API session
Create a new Digital Credentials API session for server-to-server verification.
Returns encryption keys and request configurations for both Chrome/Android (OpenID4VP)
and Safari/iOS (mdoc) protocols. Your frontend uses these to call navigator.credentials.get()
and then POSTs the encrypted response back to the verify endpoint.
Requires Secret Key authentication (aho_sec-* format API key).
Parameters
| Name | Location | Type | Description |
|---|---|---|---|
X-API-Key
*
|
header | string | Secret API key for authentication (aho_sec-* format) |
* Required parameter
Request Body
Parameters for creating a DC API session
claims
array[string]
Claims to request from the credential
Example: ["given_name","family_name","age_over_21"]
Array items:
return_claims
union
Which claims to return in the result. true=all requested (default), false=none, 'all'=all, array=specific claims
Example: true
document_types
array[string]
Document types to accept (e.g., org.iso.18013.5.1.mDL)
Example: ["org.iso.18013.5.1.mDL"]
Array items:
client_name
string
Display name shown in the wallet (optional, defaults to account name)
Example: Acme Bar & Grill
Response
Content-Type: application/json
Response from creating a DC API session
success
*
boolean
Example: true
data
*
object
session_id
*
string (uuid)
Session identifier for subsequent verify call
Example: f0a3a392-9c8e-416e-a71a-628aef39d268
expires_at
*
string (date-time)
Session expiration time
Example: 2026-01-15T10:05:00Z
created_at
*
string (date-time)
Session creation time
Example: 2026-01-15T10:00:00Z
request
*
object
Protocol-specific request configurations
openid4vp
object
Chrome/Android Digital Credentials API request config
protocol
string
Example: openid4vp-v1-unsigned
data
object
OpenID4VP request object
nonce
string
response_type
string
Example: vp_token
response_mode
string
Example: dc_api
dcql_query
object
client_metadata
object
apple_mdoc
object
Safari/iOS Digital Credentials API request config
protocol
string
Example: org-iso-mdoc
data
object
CBOR-encoded request data
deviceRequest
string
Base64-encoded CBOR deviceRequest
encryptionInfo
string
Base64-encoded CBOR encryptionInfo
Code Examples
import os
from aho_sdk import AhoSdk
client = AhoSdk.verifier(api_key=os.environ["AHO_API_KEY"])
result = client.dc_sessions.create(
body={
"claims": ["given_name", "family_name", "age_over_21"],
"return_claims": True,
"document_types": ["org.iso.18013.5.1.mDL"],
"client_name": "Acme Bar & Grill"
}
)
client = AhoSdk.verifier(api_key: ENV["AHO_API_KEY"])
result = client.dc_sessions.create(
body: {
claims: ["given_name", "family_name", "age_over_21"],
return_claims: true,
document_types: ["org.iso.18013.5.1.mDL"],
client_name: "Acme Bar & Grill"
}
)
import { AhoSdk } from '@aho/sdk';
const client = AhoSdk.verifier({ apiKey: process.env.AHO_API_KEY });
const result = await client.dc_sessions.create({
body: {
claims: ["given_name", "family_name", "age_over_21"],
returnClaims: true,
documentTypes: ["org.iso.18013.5.1.mDL"],
clientName: "Acme Bar & Grill"
}
});
curl -X POST 'https://api.aho.com/v1/verifier/dc_sessions' \
-H 'X-API-Key: $AHO_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"claims": [
"given_name",
"family_name",
"age_over_21"
],
"return_claims": true,
"document_types": [
"org.iso.18013.5.1.mDL"
],
"client_name": "Acme Bar & Grill"
}'
Try It
Log in to test this endpoint directly from the documentation.
Log in