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.SetApnsProviderAsync(
new SetGuardianFactorsProviderPushNotificationApnsRequestContent()
);
}
}package com.example.usage;
import com.auth0.client.mgmt.ManagementApi;
import com.auth0.client.mgmt.resources.guardian.factors.pushnotification.requests.SetGuardianFactorsProviderPushNotificationApnsRequestContent;
public class Example {
public static void main(String[] args) {
ManagementApi client = ManagementApi
.builder()
.token("<token>")
.build();
client.guardian().factors().pushNotification().setApnsProvider(
SetGuardianFactorsProviderPushNotificationApnsRequestContent
.builder()
.build()
);
}
}<?php
namespace Example;
use Auth0\SDK\API\Management\Management;
use Auth0\SDK\API\Management\Guardian\Factors\PushNotification\Requests\SetGuardianFactorsProviderPushNotificationApnsRequestContent;
$client = new Management(
token: '<token>',
);
$client->guardian->factors->pushNotification->setApnsProvider(
new SetGuardianFactorsProviderPushNotificationApnsRequestContent([]),
);from auth0.management import ManagementClient
client = ManagementClient(
token="<token>",
)
client.guardian.factors.push_notification.set_apns_provider()require "auth0"
client = Auth0::Management.new(token: "<token>")
client.guardian.factors.push_notification.set_apns_providercurl --request PUT \
--url https://{tenantDomain}/api/v2/guardian/factors/push-notification/providers/apns \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"sandbox": true,
"bundle_id": "<string>",
"p12": "<string>"
}
'const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({sandbox: true, bundle_id: '<string>', p12: '<string>'})
};
fetch('https://{tenantDomain}/api/v2/guardian/factors/push-notification/providers/apns', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{tenantDomain}/api/v2/guardian/factors/push-notification/providers/apns"
payload := strings.NewReader("{\n \"sandbox\": true,\n \"bundle_id\": \"<string>\",\n \"p12\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"sandbox": true,
"bundle_id": "<string>"
}Update APNS configuration
Overwrite all configuration details of the multi-factor authentication APNS provider associated with your tenant.
PUT
https://{tenantDomain}/api/v2
/
guardian
/
factors
/
push-notification
/
providers
/
apns
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.SetApnsProviderAsync(
new SetGuardianFactorsProviderPushNotificationApnsRequestContent()
);
}
}package com.example.usage;
import com.auth0.client.mgmt.ManagementApi;
import com.auth0.client.mgmt.resources.guardian.factors.pushnotification.requests.SetGuardianFactorsProviderPushNotificationApnsRequestContent;
public class Example {
public static void main(String[] args) {
ManagementApi client = ManagementApi
.builder()
.token("<token>")
.build();
client.guardian().factors().pushNotification().setApnsProvider(
SetGuardianFactorsProviderPushNotificationApnsRequestContent
.builder()
.build()
);
}
}<?php
namespace Example;
use Auth0\SDK\API\Management\Management;
use Auth0\SDK\API\Management\Guardian\Factors\PushNotification\Requests\SetGuardianFactorsProviderPushNotificationApnsRequestContent;
$client = new Management(
token: '<token>',
);
$client->guardian->factors->pushNotification->setApnsProvider(
new SetGuardianFactorsProviderPushNotificationApnsRequestContent([]),
);from auth0.management import ManagementClient
client = ManagementClient(
token="<token>",
)
client.guardian.factors.push_notification.set_apns_provider()require "auth0"
client = Auth0::Management.new(token: "<token>")
client.guardian.factors.push_notification.set_apns_providercurl --request PUT \
--url https://{tenantDomain}/api/v2/guardian/factors/push-notification/providers/apns \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"sandbox": true,
"bundle_id": "<string>",
"p12": "<string>"
}
'const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({sandbox: true, bundle_id: '<string>', p12: '<string>'})
};
fetch('https://{tenantDomain}/api/v2/guardian/factors/push-notification/providers/apns', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{tenantDomain}/api/v2/guardian/factors/push-notification/providers/apns"
payload := strings.NewReader("{\n \"sandbox\": true,\n \"bundle_id\": \"<string>\",\n \"p12\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"sandbox": true,
"bundle_id": "<string>"
}Authorizations
bearerAuthoAuth2ClientCredentials
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/jsonapplication/x-www-form-urlencoded
⌘I