Configuring Amazon SNS

In order to receive push notifications from Guardian, it's necessary to override Guardian's default SNS settings. To do this, use the following Auth0 Management API call.

PUT https://YOUR_AUTH0_DOMAIN/api/v2/guardian/factors/push-notification/providers/sns

Content-Type: 'application/json'
Authorization: Bearer {API-TOKEN}

{
  "aws_access_key_id": "{YOUR-AWS-ACCESSKEY}",
  "aws_secret_access_key": "{YOUR-AWS-SECRET}",
  "aws_region": "{YOUR-AWS-REGION}",
  "sns_apns_platform_application_arn": "{YOUR-SNS-APNS-ARN}",
  "sns_gcm_platform_application_arn": "{YOUR-SNS-GCM-ARN}"
}

Substitute the appropriate values for your particular configuration. For instance, with Curl this could be accomplished with:

curl -X PUT \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer {API-TOKEN}" \
  -d '{"aws_access_key_id":"{YOUR-AWS-ACCESSKEY}","aws_secret_access_key":"{YOUR-AWS-SECRET}","aws_region":"{YOUR-AWS-REGION}","sns_apns_platform_application_arn":"{YOUR-SNS-APNS-ARN}","sns_gcm_platform_application_arn":"{YOUR-SNS-GCM-ARN}"}' \
  https://YOUR_AUTH0_DOMAIN/api/v2/guardian/factors/push-notification/providers/sns

Further reading