メインコンテンツへスキップ
GET
https://{tenantDomain}/api/v2
/
clients
/
{client_id}
/
credentials
/
{credential_id}
Go
package example

import (
    context "context"

    client "github.com/auth0/go-auth0/management/management/client"
    option "github.com/auth0/go-auth0/management/management/option"
)

func do() {
    client := client.NewClient(
        option.WithToken(
            "<token>",
        ),
    )
    client.Clients.Credentials.Get(
        context.TODO(),
        "client_id",
        "credential_id",
    )
}
import { ManagementClient } from "auth0";

async function main() {
const client = new ManagementClient({
token: "<token>",
});
await client.clients.credentials.get("client_id", "credential_id");
}
main();
import { ManagementClient } from "auth0";

async function main() {
const client = new ManagementClient({
token: "<token>",
});
await client.clients.credentials.get("client_id", "credential_id");
}
main();
curl --request GET \
--url https://{tenantDomain}/api/v2/clients/{client_id}/credentials/{credential_id} \
--header 'Authorization: Bearer <token>'
import requests

url = "https://{tenantDomain}/api/v2/clients/{client_id}/credentials/{credential_id}"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://{tenantDomain}/api/v2/clients/{client_id}/credentials/{credential_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
HttpResponse<String> response = Unirest.get("https://{tenantDomain}/api/v2/clients/{client_id}/credentials/{credential_id}")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://{tenantDomain}/api/v2/clients/{client_id}/credentials/{credential_id}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
{
  "id": "cred_1m7sfABoNTTKYwTQ8qt6tX",
  "name": "",
  "kid": "IZSSTECp...",
  "alg": "RS256",
  "subject_dn": "<string>",
  "thumbprint_sha256": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "expires_at": "2023-11-07T05:31:56Z"
}

承認

Authorization
string
header
必須

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

パスパラメータ

client_id
string
必須

ID of the client.

credential_id
string
必須

ID of the credential.

レスポンス

Credential successfully retrieved.

id
string
デフォルト:cred_1m7sfABoNTTKYwTQ8qt6tX

ID of the credential. Generated on creation.

name
string
デフォルト:""

The name given to the credential by the user.

kid
string
デフォルト:IZSSTECp...

The key identifier of the credential, generated on creation.

alg
enum<string>
デフォルト:RS256

Algorithm which will be used with the credential. Supported algorithms: RS256,RS384,PS256

利用可能なオプション:
RS256,
RS384,
PS256
credential_type
enum<string>

The type of credential.

利用可能なオプション:
public_key,
cert_subject_dn,
x509_cert
subject_dn
string

The X509 certificate's Subject Distinguished Name

thumbprint_sha256
string

The X509 certificate's SHA256 thumbprint

created_at
string<date-time>

The ISO 8601 formatted date the credential was created.

updated_at
string<date-time>

The ISO 8601 formatted date the credential was updated.

expires_at
string<date-time>

The ISO 8601 formatted date representing the expiration of the credential.