curl \
-X POST \
-H 'Content-Type: application/json' \
-H "X-API-KEY: 9LFHJCyxgzDjMsFLUf2FfpiI9ZLTlaLi" \
-d '{
"credentialDescription": {
"credentialType": "org.iso.18013.5.1.mDL",
"credentialFormat": "mso_mdoc"
},
"trustConfig": "trust_all"
}' \
https://evs.fortid.com/verification-session/initiate body = {
"credentialDescription" : {
"credentialType" : "org.iso.18013.5.1.mDL" ,
"credentialFormat" : "mso_mdoc" ,
},
"trustConfig" : "trust_all"
}
headers = {
"X-API-KEY" : "9LFHJCyxgzDjMsFLUf2FfpiI9ZLTlaLi"
}
requests . post (
url = "https://evs.fortid.com/verification-session/initiate" ,
json = body,
headers = headers,
) let body = r#"{
"credentialDescription": [
{
"credentialType": "eu.europa.ec.eudi.pid.1",
"credentialFormat": "mso_mdoc"
}
],
"trustConfig": "trust_all"
}"# ;
let client = reqwest :: blocking :: Client :: new ();
let _ = client
. post ( "https://evs.fortid.com/verification-session/initiate" )
. header ( "X-API-KEY" , "9LFHJCyxgzDjMsFLUf2FfpiI9ZLTlaLi" )
. header ( "Content-Type" , "application/json" )
. body (body)
. send (); const body = JSON .stringify ({
credentialDescription : {
credentialType : "org.iso.18013.5.1.mDL" ,
credentialFormat : "mso_mdoc" ,
} ,
trustConfig : "trust_all" ,
});
const res = await fetch ( "https://evs.fortid.com/verification-session/initiate" , {
method : "POST" ,
headers : {
"Content-Type" : "application/json" ,
"X-API-KEY" : "9LFHJCyxgzDjMsFLUf2FfpiI9ZLTlaLi" ,
} ,
body ,
}); url := "https://evs.fortid.com/verification-session/initiate"
body := strings. NewReader (
`{
"credentialDescription": {
"credentialType": "org.iso.18013.5.1.mDL",
"credentialFormat": "mso_mdoc"
},
"trustConfig": "trust_all"
}` )
req, _ := http. NewRequest ( "POST" , url, body)
req.Header. Add ( "X-API-KEY" , "9LFHJCyxgzDjMsFLUf2FfpiI9ZLTlaLi" )
req.Header. Add ( "Content-Type" , "application/json" )
http.DefaultClient. Do (req) var body = BodyPublishers . ofString (
"{\n" +
" \"credentialDescription\": {\n" +
" \"credentialType\": \"org.iso.18013.5.1.mDL\",\n" +
" \"credentialFormat\": \"mso_mdoc\"\n" +
" },\n" +
" \"trustConfig\": \"trust_all\"\n" +
"}"
);
HttpClient client = HttpClient . newHttpClient ();
HttpRequest request = HttpRequest . newBuilder ()
. uri ( URI . create ( "https://evs.fortid.com/verification-session/initiate" ))
. header ( "Content-Type" , "application/json" )
. header ( "X-API-KEY" , "9LFHJCyxgzDjMsFLUf2FfpiI9ZLTlaLi" )
. POST (body)
. build ();
client . send (request , BodyHandlers . ofString ()); var body = new StringContent ( """
{
"credentialDescription": {
"credentialType": "org.iso.18013.5.1.mDL",
"credentialFormat": "mso_mdoc"
},
"trustConfig": "trust_all"
}
""" , Encoding . UTF8 , "application/json" );
using var client = new HttpClient ();
client . DefaultRequestHeaders . Add ( "X-API-KEY" , "9LFHJCyxgzDjMsFLUf2FfpiI9ZLTlaLi" );
await client . PostAsync (
"https://evs.fortid.com/verification-session/initiate" ,
body
); val json = """
{
"credentialDescription": {
"credentialType": "org.iso.18013.5.1.mDL",
"credentialFormat": "mso_mdoc"
},
"trustConfig": "trust_all"
}
"""
val body = json. toRequestBody ( "application/json" . toMediaType ())
val client = OkHttpClient ()
val request = Request. Builder ()
. url ( "https://evs.fortid.com/verification-session/initiate" )
. addHeader ( "X-API-KEY" , "9LFHJCyxgzDjMsFLUf2FfpiI9ZLTlaLi" )
. post (body)
. build ()
client. newCall (request). execute ()