Skip to main content
PUT
https://{tenantDomain}/api/v2
/
guardian
/
factors
/
push-notification
/
providers
/
fcm
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.SetFcmProviderAsync(
            new SetGuardianFactorsProviderPushNotificationFcmRequestContent()
        );
    }

}
package com.example.usage;

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

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

client.guardian().factors().pushNotification().setFcmProvider(
SetGuardianFactorsProviderPushNotificationFcmRequestContent
.builder()
.build()
);
}
}
<?php

namespace Example;

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

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

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

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

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

client.guardian.factors.push_notification.set_fcm_provider
curl --request PUT \
--url https://{tenantDomain}/api/v2/guardian/factors/push-notification/providers/fcm \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"server_key": "<string>"
}
'
const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({server_key: '<string>'})
};

fetch('https://{tenantDomain}/api/v2/guardian/factors/push-notification/providers/fcm', 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/fcm"

payload := strings.NewReader("{\n \"server_key\": \"<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))

}
{}

Authorizations

Authorization
string
header
required

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

Body

server_key
string | null
Required string length: 1 - 152

Response

FCM configuration updated

The response is of type object.