curl --request POST \
--url https://{appid}.api-{region}.cometchat.io/v3/notifications/push/v1/providers/fcm \
--header 'Content-Type: application/json' \
--header 'apikey: <api-key>' \
--data '{
"providerId": "<string>",
"serviceAccountFilename": "<string>",
"serviceAccountCreds": {
"project_id": "<string>",
"client_email": "<string>",
"private_key": "<string>",
"private_key_id": "<string>"
},
"notificationInPayload": {
"ios": {
"chat": true,
"call": true
},
"android": {
"chat": true,
"call": true
},
"web": {
"chat": true,
"call": true
}
}
}'
{
"data": {
"success": true
}
}
Add new FCM provider for the given app.
curl --request POST \
--url https://{appid}.api-{region}.cometchat.io/v3/notifications/push/v1/providers/fcm \
--header 'Content-Type: application/json' \
--header 'apikey: <api-key>' \
--data '{
"providerId": "<string>",
"serviceAccountFilename": "<string>",
"serviceAccountCreds": {
"project_id": "<string>",
"client_email": "<string>",
"private_key": "<string>",
"private_key_id": "<string>"
},
"notificationInPayload": {
"ios": {
"chat": true,
"call": true
},
"android": {
"chat": true,
"call": true
},
"web": {
"chat": true,
"call": true
}
}
}'
{
"data": {
"success": true
}
}
API Key with fullAccess scope(i.e. Rest API Key from the Dashboard).
A list of push notification's settings
The response is of type object
.
Was this page helpful?