メインコンテンツへスキップ
PUT
https://{tenantDomain}/api/v2
/
guardian
/
factors
/
push-notification
/
providers
/
sns
Go
package example

import (
    context "context"

    client "github.com/auth0/go-auth0/management/management/client"
    factors "github.com/auth0/go-auth0/management/management/guardian/factors"
    option "github.com/auth0/go-auth0/management/management/option"
)

func do() {
    client := client.NewClient(
        option.WithToken(
            "<token>",
        ),
    )
    request := &factors.SetGuardianFactorsProviderPushNotificationSnsRequestContent{}
    client.Guardian.Factors.PushNotification.SetSnsProvider(
        context.TODO(),
        request,
    )
}
import { ManagementClient } from "auth0";

async function main() {
const client = new ManagementClient({
token: "<token>",
});
await client.guardian.factors.pushNotification.setSnsProvider({});
}
main();
import { ManagementClient } from "auth0";

async function main() {
const client = new ManagementClient({
token: "<token>",
});
await client.guardian.factors.pushNotification.setSnsProvider({});
}
main();
curl --request PUT \
--url https://{tenantDomain}/api/v2/guardian/factors/push-notification/providers/sns \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"aws_access_key_id": "wywA2BH4VqTpfywiDuyDAYZL3xQjoO40",
"aws_secret_access_key": "B1ER5JHDGJL3C4sVAKK7SBsq806R3IpL",
"aws_region": "us-west-1",
"sns_apns_platform_application_arn": "<string>",
"sns_gcm_platform_application_arn": "urn://yRMeBxgcCXh8MeTXPBAxhQnm6gP6f5nP"
}
'
import requests

url = "https://{tenantDomain}/api/v2/guardian/factors/push-notification/providers/sns"

payload = {
"aws_access_key_id": "wywA2BH4VqTpfywiDuyDAYZL3xQjoO40",
"aws_secret_access_key": "B1ER5JHDGJL3C4sVAKK7SBsq806R3IpL",
"aws_region": "us-west-1",
"sns_apns_platform_application_arn": "<string>",
"sns_gcm_platform_application_arn": "urn://yRMeBxgcCXh8MeTXPBAxhQnm6gP6f5nP"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.put(url, json=payload, headers=headers)

print(response.text)
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://{tenantDomain}/api/v2/guardian/factors/push-notification/providers/sns",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'aws_access_key_id' => 'wywA2BH4VqTpfywiDuyDAYZL3xQjoO40',
'aws_secret_access_key' => 'B1ER5JHDGJL3C4sVAKK7SBsq806R3IpL',
'aws_region' => 'us-west-1',
'sns_apns_platform_application_arn' => '<string>',
'sns_gcm_platform_application_arn' => 'urn://yRMeBxgcCXh8MeTXPBAxhQnm6gP6f5nP'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
HttpResponse<String> response = Unirest.put("https://{tenantDomain}/api/v2/guardian/factors/push-notification/providers/sns")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"aws_access_key_id\": \"wywA2BH4VqTpfywiDuyDAYZL3xQjoO40\",\n \"aws_secret_access_key\": \"B1ER5JHDGJL3C4sVAKK7SBsq806R3IpL\",\n \"aws_region\": \"us-west-1\",\n \"sns_apns_platform_application_arn\": \"<string>\",\n \"sns_gcm_platform_application_arn\": \"urn://yRMeBxgcCXh8MeTXPBAxhQnm6gP6f5nP\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://{tenantDomain}/api/v2/guardian/factors/push-notification/providers/sns")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"aws_access_key_id\": \"wywA2BH4VqTpfywiDuyDAYZL3xQjoO40\",\n \"aws_secret_access_key\": \"B1ER5JHDGJL3C4sVAKK7SBsq806R3IpL\",\n \"aws_region\": \"us-west-1\",\n \"sns_apns_platform_application_arn\": \"<string>\",\n \"sns_gcm_platform_application_arn\": \"urn://yRMeBxgcCXh8MeTXPBAxhQnm6gP6f5nP\"\n}"

response = http.request(request)
puts response.read_body
{
  "aws_access_key_id": "wywA2BH4VqTpfywiDuyDAYZL3xQjoO40",
  "aws_secret_access_key": "B1ER5JHDGJL3C4sVAKK7SBsq806R3IpL",
  "aws_region": "us-west-1",
  "sns_apns_platform_application_arn": "<string>",
  "sns_gcm_platform_application_arn": "urn://yRMeBxgcCXh8MeTXPBAxhQnm6gP6f5nP"
}

承認

Authorization
string
header
必須

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

ボディ

aws_access_key_id
string | null
デフォルト:wywA2BH4VqTpfywiDuyDAYZL3xQjoO40
Required string length: 1 - 1000
aws_secret_access_key
string | null
デフォルト:B1ER5JHDGJL3C4sVAKK7SBsq806R3IpL
Required string length: 1 - 1000
aws_region
string | null
デフォルト:us-west-1
Required string length: 1 - 1000
Pattern: ^(?:us-east-[0-9]{1,2}|us-west-[0-9]{1,2}|ap-southeast-[0-9]{1,2}|ap-northeast-[0-9]{1,2}|ap-central-[0-9]{1,2}|eu-west-[0-9]{1,2}|eu-central-[0-9]{1,2})$
sns_apns_platform_application_arn
string | null
Required string length: 1 - 1000
sns_gcm_platform_application_arn
string | null
デフォルト:urn://yRMeBxgcCXh8MeTXPBAxhQnm6gP6f5nP
Required string length: 1 - 1000

レスポンス

AWS SNS configuration successfully updated.

aws_access_key_id
string | null
デフォルト:wywA2BH4VqTpfywiDuyDAYZL3xQjoO40
Required string length: 1 - 1000
aws_secret_access_key
string | null
デフォルト:B1ER5JHDGJL3C4sVAKK7SBsq806R3IpL
Required string length: 1 - 1000
aws_region
string | null
デフォルト:us-west-1
Required string length: 1 - 1000
Pattern: ^(?:us-east-[0-9]{1,2}|us-west-[0-9]{1,2}|ap-southeast-[0-9]{1,2}|ap-northeast-[0-9]{1,2}|ap-central-[0-9]{1,2}|eu-west-[0-9]{1,2}|eu-central-[0-9]{1,2})$
sns_apns_platform_application_arn
string | null
Required string length: 1 - 1000
sns_gcm_platform_application_arn
string | null
デフォルト:urn://yRMeBxgcCXh8MeTXPBAxhQnm6gP6f5nP
Required string length: 1 - 1000