Go
package example
import (
context "context"
management "github.com/auth0/go-auth0/management/management"
client "github.com/auth0/go-auth0/management/management/client"
option "github.com/auth0/go-auth0/management/management/option"
verification "github.com/auth0/go-auth0/management/management/verifiablecredentials/verification"
)
func do() {
client := client.NewClient(
option.WithToken(
"<token>",
),
)
request := &verification.CreateVerifiableCredentialTemplateRequestContent{
Name: "name",
Type: "type",
Dialect: "dialect",
Presentation: &management.MdlPresentationRequest{
OrgIso1801351MDl: &management.MdlPresentationRequestProperties{
OrgIso1801351: &management.MdlPresentationProperties{},
},
},
WellKnownTrustedIssuers: "well_known_trusted_issuers",
}
client.VerifiableCredentials.Verification.Templates.Create(
context.TODO(),
request,
)
}import { ManagementClient } from "auth0";
async function main() {
const client = new ManagementClient({
token: "<token>",
});
await client.verifiableCredentials.verification.templates.create({
name: "name",
type: "type",
dialect: "dialect",
presentation: {
orgIso1801351MDl: {
orgIso1801351: {},
},
},
wellKnownTrustedIssuers: "well_known_trusted_issuers",
});
}
main();import { ManagementClient } from "auth0";
async function main() {
const client = new ManagementClient({
token: "<token>",
});
await client.verifiableCredentials.verification.templates.create({
name: "name",
type: "type",
dialect: "dialect",
presentation: {
orgIso1801351MDl: {
orgIso1801351: {},
},
},
wellKnownTrustedIssuers: "well_known_trusted_issuers",
});
}
main();curl --request POST \
--url https://{tenantDomain}/api/v2/verifiable-credentials/verification/templates \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"type": "<string>",
"dialect": "<string>",
"presentation": {
"org.iso.18013.5.1.mDL": {
"org.iso.18013.5.1": {
"family_name": true,
"given_name": true,
"birth_date": true,
"issue_date": true,
"expiry_date": true,
"issuing_country": true,
"issuing_authority": true,
"portrait": true,
"driving_privileges": true,
"resident_address": true,
"portrait_capture_date": true,
"age_in_years": true,
"age_birth_year": true,
"issuing_jurisdiction": true,
"nationality": true,
"resident_city": true,
"resident_state": true,
"resident_postal_code": true,
"resident_country": true,
"family_name_national_character": true,
"given_name_national_character": true
}
}
},
"well_known_trusted_issuers": "<string>",
"custom_certificate_authority": "<string>"
}
'import requests
url = "https://{tenantDomain}/api/v2/verifiable-credentials/verification/templates"
payload = {
"name": "<string>",
"type": "<string>",
"dialect": "<string>",
"presentation": { "org.iso.18013.5.1.mDL": { "org.iso.18013.5.1": {
"family_name": True,
"given_name": True,
"birth_date": True,
"issue_date": True,
"expiry_date": True,
"issuing_country": True,
"issuing_authority": True,
"portrait": True,
"driving_privileges": True,
"resident_address": True,
"portrait_capture_date": True,
"age_in_years": True,
"age_birth_year": True,
"issuing_jurisdiction": True,
"nationality": True,
"resident_city": True,
"resident_state": True,
"resident_postal_code": True,
"resident_country": True,
"family_name_national_character": True,
"given_name_national_character": True
} } },
"well_known_trusted_issuers": "<string>",
"custom_certificate_authority": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{tenantDomain}/api/v2/verifiable-credentials/verification/templates",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'type' => '<string>',
'dialect' => '<string>',
'presentation' => [
'org.iso.18013.5.1.mDL' => [
'org.iso.18013.5.1' => [
'family_name' => true,
'given_name' => true,
'birth_date' => true,
'issue_date' => true,
'expiry_date' => true,
'issuing_country' => true,
'issuing_authority' => true,
'portrait' => true,
'driving_privileges' => true,
'resident_address' => true,
'portrait_capture_date' => true,
'age_in_years' => true,
'age_birth_year' => true,
'issuing_jurisdiction' => true,
'nationality' => true,
'resident_city' => true,
'resident_state' => true,
'resident_postal_code' => true,
'resident_country' => true,
'family_name_national_character' => true,
'given_name_national_character' => true
]
]
],
'well_known_trusted_issuers' => '<string>',
'custom_certificate_authority' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.post("https://{tenantDomain}/api/v2/verifiable-credentials/verification/templates")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"dialect\": \"<string>\",\n \"presentation\": {\n \"org.iso.18013.5.1.mDL\": {\n \"org.iso.18013.5.1\": {\n \"family_name\": true,\n \"given_name\": true,\n \"birth_date\": true,\n \"issue_date\": true,\n \"expiry_date\": true,\n \"issuing_country\": true,\n \"issuing_authority\": true,\n \"portrait\": true,\n \"driving_privileges\": true,\n \"resident_address\": true,\n \"portrait_capture_date\": true,\n \"age_in_years\": true,\n \"age_birth_year\": true,\n \"issuing_jurisdiction\": true,\n \"nationality\": true,\n \"resident_city\": true,\n \"resident_state\": true,\n \"resident_postal_code\": true,\n \"resident_country\": true,\n \"family_name_national_character\": true,\n \"given_name_national_character\": true\n }\n }\n },\n \"well_known_trusted_issuers\": \"<string>\",\n \"custom_certificate_authority\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenantDomain}/api/v2/verifiable-credentials/verification/templates")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"dialect\": \"<string>\",\n \"presentation\": {\n \"org.iso.18013.5.1.mDL\": {\n \"org.iso.18013.5.1\": {\n \"family_name\": true,\n \"given_name\": true,\n \"birth_date\": true,\n \"issue_date\": true,\n \"expiry_date\": true,\n \"issuing_country\": true,\n \"issuing_authority\": true,\n \"portrait\": true,\n \"driving_privileges\": true,\n \"resident_address\": true,\n \"portrait_capture_date\": true,\n \"age_in_years\": true,\n \"age_birth_year\": true,\n \"issuing_jurisdiction\": true,\n \"nationality\": true,\n \"resident_city\": true,\n \"resident_state\": true,\n \"resident_postal_code\": true,\n \"resident_country\": true,\n \"family_name_national_character\": true,\n \"given_name_national_character\": true\n }\n }\n },\n \"well_known_trusted_issuers\": \"<string>\",\n \"custom_certificate_authority\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "vct_0000000000000001",
"name": "<string>",
"type": "mdl",
"dialect": "simplified/1.0",
"presentation": {
"org.iso.18013.5.1.mDL": {
"org.iso.18013.5.1": {
"family_name": true,
"given_name": true,
"birth_date": true,
"issue_date": true,
"expiry_date": true,
"issuing_country": true,
"issuing_authority": true,
"portrait": true,
"driving_privileges": true,
"resident_address": true,
"portrait_capture_date": true,
"age_in_years": true,
"age_birth_year": true,
"issuing_jurisdiction": true,
"nationality": true,
"resident_city": true,
"resident_state": true,
"resident_postal_code": true,
"resident_country": true,
"family_name_national_character": true,
"given_name_national_character": true
}
}
},
"custom_certificate_authority": "<string>",
"well_known_trusted_issuers": "<string>",
"created_at": "2021-01-01T00:00:00Z",
"updated_at": "2021-01-01T00:00:00Z"
}Create a verifiable credential template.
Create a verifiable credential template.
POST
https://{tenantDomain}/api/v2
/
verifiable-credentials
/
verification
/
templates
Go
package example
import (
context "context"
management "github.com/auth0/go-auth0/management/management"
client "github.com/auth0/go-auth0/management/management/client"
option "github.com/auth0/go-auth0/management/management/option"
verification "github.com/auth0/go-auth0/management/management/verifiablecredentials/verification"
)
func do() {
client := client.NewClient(
option.WithToken(
"<token>",
),
)
request := &verification.CreateVerifiableCredentialTemplateRequestContent{
Name: "name",
Type: "type",
Dialect: "dialect",
Presentation: &management.MdlPresentationRequest{
OrgIso1801351MDl: &management.MdlPresentationRequestProperties{
OrgIso1801351: &management.MdlPresentationProperties{},
},
},
WellKnownTrustedIssuers: "well_known_trusted_issuers",
}
client.VerifiableCredentials.Verification.Templates.Create(
context.TODO(),
request,
)
}import { ManagementClient } from "auth0";
async function main() {
const client = new ManagementClient({
token: "<token>",
});
await client.verifiableCredentials.verification.templates.create({
name: "name",
type: "type",
dialect: "dialect",
presentation: {
orgIso1801351MDl: {
orgIso1801351: {},
},
},
wellKnownTrustedIssuers: "well_known_trusted_issuers",
});
}
main();import { ManagementClient } from "auth0";
async function main() {
const client = new ManagementClient({
token: "<token>",
});
await client.verifiableCredentials.verification.templates.create({
name: "name",
type: "type",
dialect: "dialect",
presentation: {
orgIso1801351MDl: {
orgIso1801351: {},
},
},
wellKnownTrustedIssuers: "well_known_trusted_issuers",
});
}
main();curl --request POST \
--url https://{tenantDomain}/api/v2/verifiable-credentials/verification/templates \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"type": "<string>",
"dialect": "<string>",
"presentation": {
"org.iso.18013.5.1.mDL": {
"org.iso.18013.5.1": {
"family_name": true,
"given_name": true,
"birth_date": true,
"issue_date": true,
"expiry_date": true,
"issuing_country": true,
"issuing_authority": true,
"portrait": true,
"driving_privileges": true,
"resident_address": true,
"portrait_capture_date": true,
"age_in_years": true,
"age_birth_year": true,
"issuing_jurisdiction": true,
"nationality": true,
"resident_city": true,
"resident_state": true,
"resident_postal_code": true,
"resident_country": true,
"family_name_national_character": true,
"given_name_national_character": true
}
}
},
"well_known_trusted_issuers": "<string>",
"custom_certificate_authority": "<string>"
}
'import requests
url = "https://{tenantDomain}/api/v2/verifiable-credentials/verification/templates"
payload = {
"name": "<string>",
"type": "<string>",
"dialect": "<string>",
"presentation": { "org.iso.18013.5.1.mDL": { "org.iso.18013.5.1": {
"family_name": True,
"given_name": True,
"birth_date": True,
"issue_date": True,
"expiry_date": True,
"issuing_country": True,
"issuing_authority": True,
"portrait": True,
"driving_privileges": True,
"resident_address": True,
"portrait_capture_date": True,
"age_in_years": True,
"age_birth_year": True,
"issuing_jurisdiction": True,
"nationality": True,
"resident_city": True,
"resident_state": True,
"resident_postal_code": True,
"resident_country": True,
"family_name_national_character": True,
"given_name_national_character": True
} } },
"well_known_trusted_issuers": "<string>",
"custom_certificate_authority": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{tenantDomain}/api/v2/verifiable-credentials/verification/templates",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'type' => '<string>',
'dialect' => '<string>',
'presentation' => [
'org.iso.18013.5.1.mDL' => [
'org.iso.18013.5.1' => [
'family_name' => true,
'given_name' => true,
'birth_date' => true,
'issue_date' => true,
'expiry_date' => true,
'issuing_country' => true,
'issuing_authority' => true,
'portrait' => true,
'driving_privileges' => true,
'resident_address' => true,
'portrait_capture_date' => true,
'age_in_years' => true,
'age_birth_year' => true,
'issuing_jurisdiction' => true,
'nationality' => true,
'resident_city' => true,
'resident_state' => true,
'resident_postal_code' => true,
'resident_country' => true,
'family_name_national_character' => true,
'given_name_national_character' => true
]
]
],
'well_known_trusted_issuers' => '<string>',
'custom_certificate_authority' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.post("https://{tenantDomain}/api/v2/verifiable-credentials/verification/templates")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"dialect\": \"<string>\",\n \"presentation\": {\n \"org.iso.18013.5.1.mDL\": {\n \"org.iso.18013.5.1\": {\n \"family_name\": true,\n \"given_name\": true,\n \"birth_date\": true,\n \"issue_date\": true,\n \"expiry_date\": true,\n \"issuing_country\": true,\n \"issuing_authority\": true,\n \"portrait\": true,\n \"driving_privileges\": true,\n \"resident_address\": true,\n \"portrait_capture_date\": true,\n \"age_in_years\": true,\n \"age_birth_year\": true,\n \"issuing_jurisdiction\": true,\n \"nationality\": true,\n \"resident_city\": true,\n \"resident_state\": true,\n \"resident_postal_code\": true,\n \"resident_country\": true,\n \"family_name_national_character\": true,\n \"given_name_national_character\": true\n }\n }\n },\n \"well_known_trusted_issuers\": \"<string>\",\n \"custom_certificate_authority\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenantDomain}/api/v2/verifiable-credentials/verification/templates")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"dialect\": \"<string>\",\n \"presentation\": {\n \"org.iso.18013.5.1.mDL\": {\n \"org.iso.18013.5.1\": {\n \"family_name\": true,\n \"given_name\": true,\n \"birth_date\": true,\n \"issue_date\": true,\n \"expiry_date\": true,\n \"issuing_country\": true,\n \"issuing_authority\": true,\n \"portrait\": true,\n \"driving_privileges\": true,\n \"resident_address\": true,\n \"portrait_capture_date\": true,\n \"age_in_years\": true,\n \"age_birth_year\": true,\n \"issuing_jurisdiction\": true,\n \"nationality\": true,\n \"resident_city\": true,\n \"resident_state\": true,\n \"resident_postal_code\": true,\n \"resident_country\": true,\n \"family_name_national_character\": true,\n \"given_name_national_character\": true\n }\n }\n },\n \"well_known_trusted_issuers\": \"<string>\",\n \"custom_certificate_authority\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "vct_0000000000000001",
"name": "<string>",
"type": "mdl",
"dialect": "simplified/1.0",
"presentation": {
"org.iso.18013.5.1.mDL": {
"org.iso.18013.5.1": {
"family_name": true,
"given_name": true,
"birth_date": true,
"issue_date": true,
"expiry_date": true,
"issuing_country": true,
"issuing_authority": true,
"portrait": true,
"driving_privileges": true,
"resident_address": true,
"portrait_capture_date": true,
"age_in_years": true,
"age_birth_year": true,
"issuing_jurisdiction": true,
"nationality": true,
"resident_city": true,
"resident_state": true,
"resident_postal_code": true,
"resident_country": true,
"family_name_national_character": true,
"given_name_national_character": true
}
}
},
"custom_certificate_authority": "<string>",
"well_known_trusted_issuers": "<string>",
"created_at": "2021-01-01T00:00:00Z",
"updated_at": "2021-01-01T00:00:00Z"
}Autorisations
bearerAuthoAuth2ClientCredentials
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Corps
application/jsonapplication/x-www-form-urlencoded
Required string length:
1 - 255Required string length:
1 - 255Maximum string length:
255Pattern:
^simplified/1.0$A simplified presentation request
Show child attributes
Show child attributes
Required string length:
1 - 255Pattern:
^aamva$Required string length:
1 - 4096Réponse
Template successfully created.
The id of the template.
The name of the template.
The type of the template.
The dialect of the template.
Maximum string length:
255A simplified presentation request
Show child attributes
Show child attributes
The custom certificate authority.
Required string length:
1 - 4096The well-known trusted issuers, comma separated.
Required string length:
1 - 255The date and time the template was created.
The date and time the template was created.
List verifiable credential templates for a tenant.
Précédent
Get a verifiable credential template by ID.
Suivant
⌘I