C#
using Auth0.ManagementApi;
using System.Threading.Tasks;
using Auth0.ManagementApi.Organizations;
public partial class Examples
{
public async Task Example() {
var client = new ManagementApiClient(
token: "<token>",
clientOptions: new ClientOptions { BaseUrl = "https://{YOUR_DOMAIN}/api/v2" }
);
await client.Organizations.Clients.UpdateAsync(
id: "id",
clientId: "client_id",
request: new UpdateOrganizationClientRequestContent()
);
}
}package com.example.usage;
import com.auth0.client.mgmt.ManagementApi;
import com.auth0.client.mgmt.organizations.types.UpdateOrganizationClientRequestContent;
public class Example {
public static void main(String[] args) {
ManagementApi client = ManagementApi
.builder()
.domain("{YOUR_DOMAIN}")
.token("<token>")
.build();
client.organizations().clients().update(
"id",
"client_id",
UpdateOrganizationClientRequestContent
.builder()
.build()
);
}
}<?php
namespace Example;
use Auth0\SDK\API\Management\Wrapper\ManagementClient;
use Auth0\SDK\API\Management\Wrapper\ManagementClientOptions;
use Auth0\SDK\API\Management\Organizations\Clients\Requests\UpdateOrganizationClientRequestContent;
$client = new ManagementClient(new ManagementClientOptions(
domain: '{YOUR_DOMAIN}',
token: '<token>',
));
$client->organizations->clients->update(
'id',
'client_id',
new UpdateOrganizationClientRequestContent([]),
);
from auth0.management import ManagementClient
client = ManagementClient(
domain="{YOUR_DOMAIN}",
token="<token>",
)
client.organizations.clients.update(
id="id",
client_id="client_id",
)
require "auth0"
client = Auth0::Management.new(token: "<token>", base_url: "https://{YOUR_DOMAIN}/api/v2")
client.organizations.clients.update(
id: "id",
client_id: "client_id"
)
curl --request PATCH \
--url https://{tenantDomain}/api/v2/organizations/{id}/clients/{client_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"use_for_member_access": true
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({use_for_member_access: true})
};
fetch('https://{tenantDomain}/api/v2/organizations/{id}/clients/{client_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{tenantDomain}/api/v2/organizations/{id}/clients/{client_id}"
payload := strings.NewReader("{\n \"use_for_member_access\": true\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"client_id": "<string>",
"use_for_member_access": true,
"client": {
"name": "<string>",
"app_type": "<string>",
"logo_uri": "<string>",
"is_first_party": true,
"grant_types": [
"<string>"
]
}
}{
"message": "<string>",
"statusCode": "<unknown>",
"error": "<unknown>"
}{
"message": "<string>",
"statusCode": "<unknown>",
"error": "<unknown>"
}{
"message": "<string>",
"statusCode": "<unknown>",
"error": "<unknown>"
}{
"message": "<string>",
"statusCode": "<unknown>",
"error": "<unknown>"
}{
"message": "<string>",
"statusCode": "<unknown>",
"error": "<unknown>"
}Update an organization client association
Update an organization client association.
PATCH
https://{tenantDomain}/api/v2
/
organizations
/
{id}
/
clients
/
{client_id}
C#
using Auth0.ManagementApi;
using System.Threading.Tasks;
using Auth0.ManagementApi.Organizations;
public partial class Examples
{
public async Task Example() {
var client = new ManagementApiClient(
token: "<token>",
clientOptions: new ClientOptions { BaseUrl = "https://{YOUR_DOMAIN}/api/v2" }
);
await client.Organizations.Clients.UpdateAsync(
id: "id",
clientId: "client_id",
request: new UpdateOrganizationClientRequestContent()
);
}
}package com.example.usage;
import com.auth0.client.mgmt.ManagementApi;
import com.auth0.client.mgmt.organizations.types.UpdateOrganizationClientRequestContent;
public class Example {
public static void main(String[] args) {
ManagementApi client = ManagementApi
.builder()
.domain("{YOUR_DOMAIN}")
.token("<token>")
.build();
client.organizations().clients().update(
"id",
"client_id",
UpdateOrganizationClientRequestContent
.builder()
.build()
);
}
}<?php
namespace Example;
use Auth0\SDK\API\Management\Wrapper\ManagementClient;
use Auth0\SDK\API\Management\Wrapper\ManagementClientOptions;
use Auth0\SDK\API\Management\Organizations\Clients\Requests\UpdateOrganizationClientRequestContent;
$client = new ManagementClient(new ManagementClientOptions(
domain: '{YOUR_DOMAIN}',
token: '<token>',
));
$client->organizations->clients->update(
'id',
'client_id',
new UpdateOrganizationClientRequestContent([]),
);
from auth0.management import ManagementClient
client = ManagementClient(
domain="{YOUR_DOMAIN}",
token="<token>",
)
client.organizations.clients.update(
id="id",
client_id="client_id",
)
require "auth0"
client = Auth0::Management.new(token: "<token>", base_url: "https://{YOUR_DOMAIN}/api/v2")
client.organizations.clients.update(
id: "id",
client_id: "client_id"
)
curl --request PATCH \
--url https://{tenantDomain}/api/v2/organizations/{id}/clients/{client_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"use_for_member_access": true
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({use_for_member_access: true})
};
fetch('https://{tenantDomain}/api/v2/organizations/{id}/clients/{client_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{tenantDomain}/api/v2/organizations/{id}/clients/{client_id}"
payload := strings.NewReader("{\n \"use_for_member_access\": true\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"client_id": "<string>",
"use_for_member_access": true,
"client": {
"name": "<string>",
"app_type": "<string>",
"logo_uri": "<string>",
"is_first_party": true,
"grant_types": [
"<string>"
]
}
}{
"message": "<string>",
"statusCode": "<unknown>",
"error": "<unknown>"
}{
"message": "<string>",
"statusCode": "<unknown>",
"error": "<unknown>"
}{
"message": "<string>",
"statusCode": "<unknown>",
"error": "<unknown>"
}{
"message": "<string>",
"statusCode": "<unknown>",
"error": "<unknown>"
}{
"message": "<string>",
"statusCode": "<unknown>",
"error": "<unknown>"
}承認
bearerAuthoAuth2ClientCredentials
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
パスパラメータ
ID of the organization.
ID of the client association to update.
ボディ
application/jsonapplication/x-www-form-urlencoded
Whether this client is used for member access to the organization.
レスポンス
Organization client successfully updated.
⌘I