C#
using Auth0.ManagementApi;
using System.Threading.Tasks;
public partial class Examples
{
public async Task Example() {
var client = new ManagementClient(
token: "<token>"
);
await client.RulesConfigs.SetAsync(
key: "key",
request: new SetRulesConfigRequestContent {
Value = "value"
}
);
}
}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"
)
func do() {
client := client.NewClient(
option.WithToken(
"<token>",
),
)
request := &management.SetRulesConfigRequestContent{
Value: "value",
}
client.RulesConfigs.Set(
context.TODO(),
"key",
request,
)
}package com.example.usage;
import com.auth0.client.mgmt.ManagementApi;
import com.auth0.client.mgmt.resources.rulesconfigs.requests.SetRulesConfigRequestContent;
public class Example {
public static void main(String[] args) {
ManagementApi client = ManagementApi
.builder()
.token("<token>")
.build();
client.rulesConfigs().set(
"key",
SetRulesConfigRequestContent
.builder()
.value("value")
.build()
);
}
}<?php
namespace Example;
use Auth0\SDK\API\Management\Management;
use Auth0\SDK\API\Management\RulesConfigs\Requests\SetRulesConfigRequestContent;
$client = new Management(
token: '<token>',
);
$client->rulesConfigs->set(
'key',
new SetRulesConfigRequestContent([
'value' => 'value',
]),
);from auth0.management import ManagementClient
client = ManagementClient(
token="<token>",
)
client.rules_configs.set(
key="key",
value="value",
)require "auth0"
client = Auth0::Management.new(token: "<token>")
client.rules_configs.set(
key: "key",
value: "value"
)import { ManagementClient } from "auth0";
async function main() {
const client = new ManagementClient({
token: "<token>",
});
await client.rulesConfigs.set("key", {
value: "value",
});
}
main();import { ManagementClient } from "auth0";
async function main() {
const client = new ManagementClient({
token: "<token>",
});
await client.rulesConfigs.set("key", {
value: "value",
});
}
main();curl --request PUT \
--url https://{tenantDomain}/api/v2/rules-configs/{key} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"value": "MY_RULES_CONFIG_VALUE"
}
'{
"key": "MY_RULES_CONFIG_KEY",
"value": "MY_RULES_CONFIG_VALUE"
}Set rules config for a given key
Sets a rules config variable.
PUT
https://{tenantDomain}/api/v2
/
rules-configs
/
{key}
C#
using Auth0.ManagementApi;
using System.Threading.Tasks;
public partial class Examples
{
public async Task Example() {
var client = new ManagementClient(
token: "<token>"
);
await client.RulesConfigs.SetAsync(
key: "key",
request: new SetRulesConfigRequestContent {
Value = "value"
}
);
}
}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"
)
func do() {
client := client.NewClient(
option.WithToken(
"<token>",
),
)
request := &management.SetRulesConfigRequestContent{
Value: "value",
}
client.RulesConfigs.Set(
context.TODO(),
"key",
request,
)
}package com.example.usage;
import com.auth0.client.mgmt.ManagementApi;
import com.auth0.client.mgmt.resources.rulesconfigs.requests.SetRulesConfigRequestContent;
public class Example {
public static void main(String[] args) {
ManagementApi client = ManagementApi
.builder()
.token("<token>")
.build();
client.rulesConfigs().set(
"key",
SetRulesConfigRequestContent
.builder()
.value("value")
.build()
);
}
}<?php
namespace Example;
use Auth0\SDK\API\Management\Management;
use Auth0\SDK\API\Management\RulesConfigs\Requests\SetRulesConfigRequestContent;
$client = new Management(
token: '<token>',
);
$client->rulesConfigs->set(
'key',
new SetRulesConfigRequestContent([
'value' => 'value',
]),
);from auth0.management import ManagementClient
client = ManagementClient(
token="<token>",
)
client.rules_configs.set(
key="key",
value="value",
)require "auth0"
client = Auth0::Management.new(token: "<token>")
client.rules_configs.set(
key: "key",
value: "value"
)import { ManagementClient } from "auth0";
async function main() {
const client = new ManagementClient({
token: "<token>",
});
await client.rulesConfigs.set("key", {
value: "value",
});
}
main();import { ManagementClient } from "auth0";
async function main() {
const client = new ManagementClient({
token: "<token>",
});
await client.rulesConfigs.set("key", {
value: "value",
});
}
main();curl --request PUT \
--url https://{tenantDomain}/api/v2/rules-configs/{key} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"value": "MY_RULES_CONFIG_VALUE"
}
'{
"key": "MY_RULES_CONFIG_KEY",
"value": "MY_RULES_CONFIG_VALUE"
}Authorizations
bearerAuthoAuth2ClientCredentials
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Key of the rules config variable to set (max length: 127 characters).
Required string length:
1 - 127Body
application/jsonapplication/x-www-form-urlencoded
Value for a rules config variable.
⌘I