C#
using Auth0.ManagementApi;
using System.Threading.Tasks;
using System.Collections.Generic;
public partial class Examples
{
public async Task Example() {
var client = new ManagementClient(
token: "<token>"
);
await client.Hooks.Secrets.UpdateAsync(
id: "id",
request: new Dictionary<string, string>(){
["key"] = "value",
}
);
}
}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>",
),
)
request := map[string]any{
"key": "value",
}
client.Hooks.Secrets.Update(
context.TODO(),
"id",
request,
)
}package com.example.usage;
import com.auth0.client.mgmt.ManagementApi;
import java.util.HashMap;
public class Example {
public static void main(String[] args) {
ManagementApi client = ManagementApi
.builder()
.token("<token>")
.build();
client.hooks().secrets().update(
"id",
new HashMap<String, String>() {{
put("key", "value");
}}
);
}
}<?php
namespace Example;
use Auth0\SDK\API\Management\Management;
$client = new Management(
token: '<token>',
);
$client->hooks->secrets->update(
'id',
[
'key' => 'value',
],
);from auth0.management import ManagementClient
client = ManagementClient(
token="<token>",
)
client.hooks.secrets.update(
id="id",
request={
"key": "value"
},
)require "auth0"
client = Auth0::Management.new(token: "<token>")
client.hooks.secrets.update(
id: "id",
request: {
key: "value"
}
)import { ManagementClient } from "auth0";
async function main() {
const client = new ManagementClient({
token: "<token>",
});
await client.hooks.secrets.update("id", {
"key": "value",
});
}
main();import { ManagementClient } from "auth0";
async function main() {
const client = new ManagementClient({
token: "<token>",
});
await client.hooks.secrets.update("id", {
"key": "value",
});
}
main();curl --request PATCH \
--url https://{tenantDomain}/api/v2/hooks/{id}/secrets \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{}'Update hook secrets
Update one or more existing secrets for an existing hook. Accepts an object of key-value pairs, where the key is the name of the existing secret.
PATCH
https://{tenantDomain}/api/v2
/
hooks
/
{id}
/
secrets
C#
using Auth0.ManagementApi;
using System.Threading.Tasks;
using System.Collections.Generic;
public partial class Examples
{
public async Task Example() {
var client = new ManagementClient(
token: "<token>"
);
await client.Hooks.Secrets.UpdateAsync(
id: "id",
request: new Dictionary<string, string>(){
["key"] = "value",
}
);
}
}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>",
),
)
request := map[string]any{
"key": "value",
}
client.Hooks.Secrets.Update(
context.TODO(),
"id",
request,
)
}package com.example.usage;
import com.auth0.client.mgmt.ManagementApi;
import java.util.HashMap;
public class Example {
public static void main(String[] args) {
ManagementApi client = ManagementApi
.builder()
.token("<token>")
.build();
client.hooks().secrets().update(
"id",
new HashMap<String, String>() {{
put("key", "value");
}}
);
}
}<?php
namespace Example;
use Auth0\SDK\API\Management\Management;
$client = new Management(
token: '<token>',
);
$client->hooks->secrets->update(
'id',
[
'key' => 'value',
],
);from auth0.management import ManagementClient
client = ManagementClient(
token="<token>",
)
client.hooks.secrets.update(
id="id",
request={
"key": "value"
},
)require "auth0"
client = Auth0::Management.new(token: "<token>")
client.hooks.secrets.update(
id: "id",
request: {
key: "value"
}
)import { ManagementClient } from "auth0";
async function main() {
const client = new ManagementClient({
token: "<token>",
});
await client.hooks.secrets.update("id", {
"key": "value",
});
}
main();import { ManagementClient } from "auth0";
async function main() {
const client = new ManagementClient({
token: "<token>",
});
await client.hooks.secrets.update("id", {
"key": "value",
});
}
main();curl --request PATCH \
--url https://{tenantDomain}/api/v2/hooks/{id}/secrets \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{}'承認
bearerAuthoAuth2ClientCredentials
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
パスパラメータ
ID of the hook whose secrets to update.
ボディ
application/jsonapplication/x-www-form-urlencoded
Hashmap of key-value pairs where the value must be a string.
レスポンス
Hook secrets successfully updated.
このページは役に立ちましたか?
⌘I