Passer au contenu principal
PUT
https://{tenantDomain}/api/v2
/
guardian
/
factors
/
push-notification
/
providers
/
sns
C#
using Auth0.ManagementApi;
using System.Threading.Tasks;
using Auth0.ManagementApi.Guardian.Factors;

public partial class Examples
{
    public async Task Example() {
        var client = new ManagementClient(
            token: "<token>"
        );

        await client.Guardian.Factors.PushNotification.SetSnsProviderAsync(
            new SetGuardianFactorsProviderPushNotificationSnsRequestContent()
        );
    }

}
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,
    )
}
package com.example.usage;

import com.auth0.client.mgmt.ManagementApi;
import com.auth0.client.mgmt.resources.guardian.factors.pushnotification.requests.SetGuardianFactorsProviderPushNotificationSnsRequestContent;

public class Example {
    public static void main(String[] args) {
        ManagementApi client = ManagementApi
            .builder()
            .token("<token>")
            .build();

        client.guardian().factors().pushNotification().setSnsProvider(
            SetGuardianFactorsProviderPushNotificationSnsRequestContent
                .builder()
                .build()
        );
    }
}
<?php

namespace Example;

use Auth0\SDK\API\Management\Management;
use Auth0\SDK\API\Management\Guardian\Factors\PushNotification\Requests\SetGuardianFactorsProviderPushNotificationSnsRequestContent;

$client = new Management(
    token: '<token>',
);
$client->guardian->factors->pushNotification->setSnsProvider(
    new SetGuardianFactorsProviderPushNotificationSnsRequestContent([]),
);
from auth0.management import ManagementClient

client = ManagementClient(
    token="<token>",
)

client.guardian.factors.push_notification.set_sns_provider()
require "auth0"

client = Auth0::Management.new(token: "<token>")

client.guardian.factors.push_notification.set_sns_provider
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"
}
'
{
  "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"
}

Autorisations

Authorization
string
header
requis

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

Corps

aws_access_key_id
string | null
défaut:wywA2BH4VqTpfywiDuyDAYZL3xQjoO40
Required string length: 1 - 1000
aws_secret_access_key
string | null
défaut:B1ER5JHDGJL3C4sVAKK7SBsq806R3IpL
Required string length: 1 - 1000
aws_region
string | null
défaut: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
défaut:urn://yRMeBxgcCXh8MeTXPBAxhQnm6gP6f5nP
Required string length: 1 - 1000

Réponse

AWS SNS configuration successfully updated.

aws_access_key_id
string | null
défaut:wywA2BH4VqTpfywiDuyDAYZL3xQjoO40
Required string length: 1 - 1000
aws_secret_access_key
string | null
défaut:B1ER5JHDGJL3C4sVAKK7SBsq806R3IpL
Required string length: 1 - 1000
aws_region
string | null
défaut: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
défaut:urn://yRMeBxgcCXh8MeTXPBAxhQnm6gP6f5nP
Required string length: 1 - 1000