メインコンテンツへスキップ
GET
https://{tenantDomain}/api/v2
/
organizations
/
{id}
/
client-grants
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"
    organizations "github.com/auth0/go-auth0/management/management/organizations"
)

func do() {
    client := client.NewClient(
        option.WithToken(
            "<token>",
        ),
    )
    request := &organizations.ListOrganizationClientGrantsRequestParameters{
        Audience: management.String(
            "audience",
        ),
        ClientId: management.String(
            "client_id",
        ),
        Page: management.Int(
            1,
        ),
        PerPage: management.Int(
            1,
        ),
        IncludeTotals: management.Bool(
            true,
        ),
    }
    client.Organizations.ClientGrants.List(
        context.TODO(),
        "id",
        request,
    )
}
import { ManagementClient } from "auth0";

async function main() {
const client = new ManagementClient({
token: "<token>",
});
await client.organizations.clientGrants.list("id", {
audience: "audience",
clientId: "client_id",
page: 1,
perPage: 1,
includeTotals: true,
});
}
main();
import { ManagementClient } from "auth0";

async function main() {
const client = new ManagementClient({
token: "<token>",
});
await client.organizations.clientGrants.list("id", {
audience: "audience",
clientId: "client_id",
page: 1,
perPage: 1,
includeTotals: true,
});
}
main();
curl --request GET \
--url https://{tenantDomain}/api/v2/organizations/{id}/client-grants \
--header 'Authorization: Bearer <token>'
import requests

url = "https://{tenantDomain}/api/v2/organizations/{id}/client-grants"

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/organizations/{id}/client-grants",
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/organizations/{id}/client-grants")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://{tenantDomain}/api/v2/organizations/{id}/client-grants")

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": "<string>",
    "client_id": "<string>",
    "audience": "<string>",
    "scope": [
      "<string>"
    ],
    "allow_any_organization": true
  }
]

承認

Authorization
string
header
必須

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

パスパラメータ

id
string
必須

Organization identifier.

Maximum string length: 50

クエリパラメータ

audience
string

Optional filter on audience of the client grant.

Maximum string length: 600
client_id
string

Optional filter on client_id of the client grant.

grant_ids
string<client-grant-id>[]

Optional filter on the ID of the client grant. Must be URL encoded and may be specified multiple times (max 10).
e.g. ../client-grants?grant_ids=id1&grant_ids=id2

page
integer

Page index of the results to return. First page is 0.

必須範囲: x >= 0
per_page
integer

Number of results per page. Defaults to 50.

必須範囲: 1 <= x <= 100
include_totals
boolean

Return results inside an object that contains the total result count (true) or as a direct array of results (false, default).

レスポンス

Client grants successfully retrieved.

id
string

ID of the client grant.

client_id
string

ID of the client.

audience
string

The audience (API identifier) of this client grant

Minimum string length: 1
scope
string[]

Scopes allowed for this client grant.

Minimum string length: 1
organization_usage
enum<string>

Defines whether organizations can be used with client credentials exchanges for this grant.

利用可能なオプション:
deny,
allow,
require
allow_any_organization
boolean

If enabled, any organization can be used with this grant. If disabled (default), the grant must be explicitly assigned to the desired organizations.