TypeScript
import { ManagementClient } from "auth0";
async function main() {
const client = new ManagementClient({
domain: "{YOUR_DOMAIN}",
token: "<token>",
});
await client.attackProtection.phoneProviderProtection.patch({
type: "exponential",
});
}
main();import { ManagementClient } from "auth0";
async function main() {
const client = new ManagementClient({
domain: "{YOUR_DOMAIN}",
token: "<token>",
});
await client.attackProtection.phoneProviderProtection.patch({
type: "exponential",
});
}
main();
package example
import (
context "context"
management "github.com/auth0/go-auth0/v3/management"
client "github.com/auth0/go-auth0/v3/management/client"
option "github.com/auth0/go-auth0/v3/management/option"
)
func do() {
mgmt, err := client.New(
"{YOUR_DOMAIN}",
option.WithToken(
"<token>",
),
)
if err != nil {
return
}
request := &management.PatchPhoneProviderProtectionRequestContent{
Type: management.PhoneProviderProtectionBackoffStrategyEnumExponential,
}
mgmt.AttackProtection.PhoneProviderProtection.Patch(
context.TODO(),
request,
)
}
# Ensure you're logged in: auth0 login
auth0 api patch "attack-protection/phone-provider-protection" --data '{
"type": "exponential"
}'using Auth0.ManagementApi;
using System.Threading.Tasks;
using Auth0.ManagementApi.AttackProtection;
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.AttackProtection.PhoneProviderProtection.PatchAsync(
new PatchPhoneProviderProtectionRequestContent {
Type = PhoneProviderProtectionBackoffStrategyEnum.Exponential
}
);
}
}
package com.example.usage;
import com.auth0.client.mgmt.ManagementApi;
import com.auth0.client.mgmt.attackprotection.types.PatchPhoneProviderProtectionRequestContent;
import com.auth0.client.mgmt.types.PhoneProviderProtectionBackoffStrategyEnum;
public class Example {
public static void main(String[] args) {
ManagementApi client = ManagementApi
.builder()
.domain("{YOUR_DOMAIN}")
.token("<token>")
.build();
client.attackProtection().phoneProviderProtection().patch(
PatchPhoneProviderProtectionRequestContent
.builder()
.type(PhoneProviderProtectionBackoffStrategyEnum.EXPONENTIAL)
.build()
);
}
}<?php
namespace Example;
use Auth0\SDK\API\Management\Wrapper\ManagementClient;
use Auth0\SDK\API\Management\Wrapper\ManagementClientOptions;
use Auth0\SDK\API\Management\AttackProtection\PhoneProviderProtection\Requests\PatchPhoneProviderProtectionRequestContent;
use Auth0\SDK\API\Management\Types\PhoneProviderProtectionBackoffStrategyEnum;
$client = new ManagementClient(new ManagementClientOptions(
domain: '{YOUR_DOMAIN}',
token: '<token>',
));
$client->attackProtection->phoneProviderProtection->patch(
new PatchPhoneProviderProtectionRequestContent([
'type' => PhoneProviderProtectionBackoffStrategyEnum::Exponential->value,
]),
);
from auth0.management import ManagementClient
client = ManagementClient(
domain="{YOUR_DOMAIN}",
token="<token>",
)
client.attack_protection.phone_provider_protection.patch(
type="exponential",
)
require "auth0"
client = Auth0::Management.new(token: "<token>", base_url: "https://{YOUR_DOMAIN}/api/v2")
client.attack_protection.phone_provider_protection.patch(type: "exponential")
curl --request PATCH \
--url https://{tenantDomain}/api/v2/attack-protection/phone-provider-protection \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{}'{
"type": "exponential"
}Update Phone Provider Protection settings
Update the phone provider protection configuration for a tenant.
PATCH
https://{tenantDomain}/api/v2
/
attack-protection
/
phone-provider-protection
TypeScript
import { ManagementClient } from "auth0";
async function main() {
const client = new ManagementClient({
domain: "{YOUR_DOMAIN}",
token: "<token>",
});
await client.attackProtection.phoneProviderProtection.patch({
type: "exponential",
});
}
main();import { ManagementClient } from "auth0";
async function main() {
const client = new ManagementClient({
domain: "{YOUR_DOMAIN}",
token: "<token>",
});
await client.attackProtection.phoneProviderProtection.patch({
type: "exponential",
});
}
main();
package example
import (
context "context"
management "github.com/auth0/go-auth0/v3/management"
client "github.com/auth0/go-auth0/v3/management/client"
option "github.com/auth0/go-auth0/v3/management/option"
)
func do() {
mgmt, err := client.New(
"{YOUR_DOMAIN}",
option.WithToken(
"<token>",
),
)
if err != nil {
return
}
request := &management.PatchPhoneProviderProtectionRequestContent{
Type: management.PhoneProviderProtectionBackoffStrategyEnumExponential,
}
mgmt.AttackProtection.PhoneProviderProtection.Patch(
context.TODO(),
request,
)
}
# Ensure you're logged in: auth0 login
auth0 api patch "attack-protection/phone-provider-protection" --data '{
"type": "exponential"
}'using Auth0.ManagementApi;
using System.Threading.Tasks;
using Auth0.ManagementApi.AttackProtection;
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.AttackProtection.PhoneProviderProtection.PatchAsync(
new PatchPhoneProviderProtectionRequestContent {
Type = PhoneProviderProtectionBackoffStrategyEnum.Exponential
}
);
}
}
package com.example.usage;
import com.auth0.client.mgmt.ManagementApi;
import com.auth0.client.mgmt.attackprotection.types.PatchPhoneProviderProtectionRequestContent;
import com.auth0.client.mgmt.types.PhoneProviderProtectionBackoffStrategyEnum;
public class Example {
public static void main(String[] args) {
ManagementApi client = ManagementApi
.builder()
.domain("{YOUR_DOMAIN}")
.token("<token>")
.build();
client.attackProtection().phoneProviderProtection().patch(
PatchPhoneProviderProtectionRequestContent
.builder()
.type(PhoneProviderProtectionBackoffStrategyEnum.EXPONENTIAL)
.build()
);
}
}<?php
namespace Example;
use Auth0\SDK\API\Management\Wrapper\ManagementClient;
use Auth0\SDK\API\Management\Wrapper\ManagementClientOptions;
use Auth0\SDK\API\Management\AttackProtection\PhoneProviderProtection\Requests\PatchPhoneProviderProtectionRequestContent;
use Auth0\SDK\API\Management\Types\PhoneProviderProtectionBackoffStrategyEnum;
$client = new ManagementClient(new ManagementClientOptions(
domain: '{YOUR_DOMAIN}',
token: '<token>',
));
$client->attackProtection->phoneProviderProtection->patch(
new PatchPhoneProviderProtectionRequestContent([
'type' => PhoneProviderProtectionBackoffStrategyEnum::Exponential->value,
]),
);
from auth0.management import ManagementClient
client = ManagementClient(
domain="{YOUR_DOMAIN}",
token="<token>",
)
client.attack_protection.phone_provider_protection.patch(
type="exponential",
)
require "auth0"
client = Auth0::Management.new(token: "<token>", base_url: "https://{YOUR_DOMAIN}/api/v2")
client.attack_protection.phone_provider_protection.patch(type: "exponential")
curl --request PATCH \
--url https://{tenantDomain}/api/v2/attack-protection/phone-provider-protection \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{}'{
"type": "exponential"
}Authorizations
bearerAuthoAuth2ClientCredentials
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/jsonapplication/x-www-form-urlencoded
The type of backoff strategy to use.
Available options:
exponential, default Response
Phone provider protection configuration successfully updated.
The type of backoff strategy to use.
Available options:
exponential, default