Read All Credential Types
GET {{apiPath}}/environments/{{envID}}/credentialTypes
Use the GET {{apiPath}}/environments/{{envID}}/credentialTypes operation to return all of the types of credentials available for issuance. A credential type corresponds to a card type presented by the compatible wallet app.
Example Request
-
cURL
-
C#
-
Go
-
HTTP
-
Java
-
jQuery
-
NodeJS
-
Python
-
PHP
-
Ruby
-
Swift
curl --location --globoff '{{apiPath}}/environments/{{envID}}/credentialTypes' \
--header 'Authorization: Bearer {{accessToken}}'
var options = new RestClientOptions("{{apiPath}}/environments/{{envID}}/credentialTypes")
{
MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("", Method.Get);
request.AddHeader("Authorization", "Bearer {{accessToken}}");
RestResponse response = await client.ExecuteAsync(request);
Console.WriteLine(response.Content);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{apiPath}}/environments/{{envID}}/credentialTypes"
method := "GET"
client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Authorization", "Bearer {{accessToken}}")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := io.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
GET /environments/{{envID}}/credentialTypes HTTP/1.1
Host: {{apiPath}}
Authorization: Bearer {{accessToken}}
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "");
Request request = new Request.Builder()
.url("{{apiPath}}/environments/{{envID}}/credentialTypes")
.method("GET", body)
.addHeader("Authorization", "Bearer {{accessToken}}")
.build();
Response response = client.newCall(request).execute();
var settings = {
"url": "{{apiPath}}/environments/{{envID}}/credentialTypes",
"method": "GET",
"timeout": 0,
"headers": {
"Authorization": "Bearer {{accessToken}}"
},
};
$.ajax(settings).done(function (response) {
console.log(response);
});
var request = require('request');
var options = {
'method': 'GET',
'url': '{{apiPath}}/environments/{{envID}}/credentialTypes',
'headers': {
'Authorization': 'Bearer {{accessToken}}'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
import requests
url = "{{apiPath}}/environments/{{envID}}/credentialTypes"
payload = {}
headers = {
'Authorization': 'Bearer {{accessToken}}'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
<?php
require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('{{apiPath}}/environments/{{envID}}/credentialTypes');
$request->setMethod(HTTP_Request2::METHOD_GET);
$request->setConfig(array(
'follow_redirects' => TRUE
));
$request->setHeader(array(
'Authorization' => 'Bearer {{accessToken}}'
));
try {
$response = $request->send();
if ($response->getStatus() == 200) {
echo $response->getBody();
}
else {
echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
$response->getReasonPhrase();
}
}
catch(HTTP_Request2_Exception $e) {
echo 'Error: ' . $e->getMessage();
}
require "uri"
require "net/http"
url = URI("{{apiPath}}/environments/{{envID}}/credentialTypes")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Get.new(url)
request["Authorization"] = "Bearer {{accessToken}}"
response = http.request(request)
puts response.read_body
var request = URLRequest(url: URL(string: "{{apiPath}}/environments/{{envID}}/credentialTypes")!,timeoutInterval: Double.infinity)
request.addValue("Bearer {{accessToken}}", forHTTPHeaderField: "Authorization")
request.httpMethod = "GET"
let task = URLSession.shared.dataTask(with: request) { data, response, error in
guard let data = data else {
print(String(describing: error))
return
}
print(String(data: data, encoding: .utf8)!)
}
task.resume()
Example Response
200 OK
{
"_links": {
"self": {
"href": "https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/credentialTypes"
}
},
"_embedded": {
"items": [
{
"_links": {
"self": {
"href": "https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/credentialTypes/41fc9049-f742-4d5f-8950-e343ade4a48a"
}
},
"id": "41fc9049-f742-4d5f-8950-e343ade4a48a",
"createdAt": "2025-02-28T20:48:10.792Z",
"updatedAt": "2025-02-28T20:48:10.792Z",
"environment": {
"id": "abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6"
},
"issuer": {
"id": "824c722c-254a-4b2d-9b50-17e2abdf5f8a"
},
"management": {
"mode": "MANAGED"
},
"title": "Title",
"description": "Subtitle",
"cardType": "Title",
"uri": "https://api.pingone.com/v1/distributedid/credentialTypes/41fc9049-f742-4d5f-8950-e343ade4a48a",
"version": {
"number": 1,
"uri": "https://api.pingone.com/v1/distributedid/credentialTypes/41fc9049-f742-4d5f-8950-e343ade4a48a/v1",
"id": "21f184c3-c21a-4907-80a8-5749d9b6b960"
},
"onDelete": {
"revokeIssuedCredentials": true
},
"visualizationTemplateData": {
"showTitle": true,
"displayFields": [
{
"showFieldName": false,
"dataFieldName": "Account"
},
{
"showFieldName": false,
"dataFieldName": "Name"
}
]
}
},
{
"_links": {
"self": {
"href": "https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/credentialTypes/6c64a0c5-36c0-4011-befa-7ffa89abcbf6"
}
},
"id": "6c64a0c5-36c0-4011-befa-7ffa89abcbf6",
"createdAt": "2024-07-09T20:33:01.206Z",
"updatedAt": "2024-07-09T20:35:57.652Z",
"environment": {
"id": "abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6"
},
"issuer": {
"id": "824c722c-254a-4b2d-9b50-17e2abdf5f8a"
},
"management": {
"mode": "MANAGED"
},
"title": "Wallet Developers",
"description": "PingOne Credentials",
"cardType": "Driver License",
"uri": "https://api.pingone.com/v1/distributedid/credentialTypes/6c64a0c5-36c0-4011-befa-7ffa89abcbf6",
"version": {
"number": 2,
"uri": "https://api.pingone.com/v1/distributedid/credentialTypes/6c64a0c5-36c0-4011-befa-7ffa89abcbf6/v2",
"id": "cd051700-9368-447c-88ca-b963c7dd544a"
},
"onDelete": {
"revokeIssuedCredentials": true
}
},
{
"_links": {
"self": {
"href": "https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/credentialTypes/6d031a6d-ca39-40a5-bd51-098db3774082"
}
},
"id": "6d031a6d-ca39-40a5-bd51-098db3774082",
"createdAt": "2025-02-28T20:46:59.406Z",
"updatedAt": "2025-02-28T20:46:59.406Z",
"environment": {
"id": "abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6"
},
"issuer": {
"id": "824c722c-254a-4b2d-9b50-17e2abdf5f8a"
},
"management": {
"mode": "AUTOMATED"
},
"title": "Title",
"description": "Subtitle",
"cardType": "Title",
"uri": "https://api.pingone.com/v1/distributedid/credentialTypes/6d031a6d-ca39-40a5-bd51-098db3774082",
"version": {
"number": 1,
"uri": "https://api.pingone.com/v1/distributedid/credentialTypes/6d031a6d-ca39-40a5-bd51-098db3774082/v1",
"id": "76fecf21-313a-49d4-b4d5-ec17281bdd20"
},
"onDelete": {
"revokeIssuedCredentials": true
},
"expiration": {
"type": "HARD",
"after": {
"duration": 1826,
"timeUnit": "DAYS"
}
},
"visualizationTemplateData": {
"showTitle": true,
"displayFields": [
{
"showFieldName": false,
"dataFieldName": "Account"
},
{
"showFieldName": false,
"dataFieldName": "Name"
}
]
}
},
{
"_links": {
"self": {
"href": "https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/credentialTypes/89acfc42-f3f0-46eb-b1a3-4d0e51f345db"
}
},
"id": "89acfc42-f3f0-46eb-b1a3-4d0e51f345db",
"createdAt": "2024-07-09T20:32:17.983Z",
"updatedAt": "2024-07-09T20:32:17.983Z",
"environment": {
"id": "abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6"
},
"issuer": {
"id": "824c722c-254a-4b2d-9b50-17e2abdf5f8a"
},
"management": {
"mode": "AUTOMATED"
},
"title": "Wallet Developers",
"description": "PingOne Credentials",
"cardType": "Driver License",
"uri": "https://api.pingone.com/v1/distributedid/credentialTypes/89acfc42-f3f0-46eb-b1a3-4d0e51f345db",
"version": {
"number": 1,
"uri": "https://api.pingone.com/v1/distributedid/credentialTypes/89acfc42-f3f0-46eb-b1a3-4d0e51f345db/v1",
"id": "0bd3be06-ce63-4b96-9f3b-43ec27f544fa"
},
"onDelete": {
"revokeIssuedCredentials": true
},
"expiration": {
"type": "HARD",
"after": {
"duration": 1826,
"timeUnit": "DAYS"
}
}
},
{
"_links": {
"self": {
"href": "https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/credentialTypes/945365ca-a1a3-4e09-978b-aa970e007324"
}
},
"id": "945365ca-a1a3-4e09-978b-aa970e007324",
"createdAt": "2024-07-10T15:42:40.409Z",
"updatedAt": "2024-07-10T15:44:31.750Z",
"environment": {
"id": "abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6"
},
"issuer": {
"id": "824c722c-254a-4b2d-9b50-17e2abdf5f8a"
},
"management": {
"mode": "MANAGED"
},
"title": "Card Developers",
"description": "PingOne Credentials",
"cardType": "Driver License",
"uri": "https://api.pingone.com/v1/distributedid/credentialTypes/945365ca-a1a3-4e09-978b-aa970e007324",
"version": {
"number": 2,
"uri": "https://api.pingone.com/v1/distributedid/credentialTypes/945365ca-a1a3-4e09-978b-aa970e007324/v2",
"id": "1b93c210-4bb9-42ca-bd39-554afcb6fd01"
},
"onDelete": {
"revokeIssuedCredentials": true
}
},
{
"_links": {
"self": {
"href": "https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/credentialTypes/b065a70c-90db-44f3-a2b4-8c455b61c0d0"
}
},
"id": "b065a70c-90db-44f3-a2b4-8c455b61c0d0",
"createdAt": "2024-04-08T18:47:52.509Z",
"updatedAt": "2024-04-08T18:47:52.509Z",
"environment": {
"id": "abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6"
},
"issuer": {
"id": "824c722c-254a-4b2d-9b50-17e2abdf5f8a"
},
"management": {
"mode": "MANAGED"
},
"title": "Card Developers",
"description": "PingOne Credentials",
"cardType": "Card Developers",
"uri": "https://api.pingone.com/v1/distributedid/credentialTypes/b065a70c-90db-44f3-a2b4-8c455b61c0d0",
"version": {
"number": 1,
"uri": "https://api.pingone.com/v1/distributedid/credentialTypes/b065a70c-90db-44f3-a2b4-8c455b61c0d0/v1",
"id": "8835dd45-bd49-48d6-a9f8-a25b923be7ee"
},
"onDelete": {
"revokeIssuedCredentials": true
}
}
]
},
"size": 6
}