curl --request POST \
--url https://apimgmt.cometchat.io/apps/{appId}/extensions/push-notification/v1/settings \
--header 'Content-Type: application/json' \
--header 'key: <key>' \
--header 'secret: <secret>' \
--data '{
"settings": {
"version": 2,
"pushProvider": 1,
"fcmCredentials": {
"project_id": "project_id",
"client_email": "client_email",
"private_key": "private_key",
"private_key_id": "private_key_id"
},
"notificationInPayload": {
"web": true,
"android": true,
"ionic_cordova": true,
"react_native": false,
"ios": true,
"flutter": true
},
"useP8": true,
"sendApnsProduction": true,
"sendNewMessageNotification": true,
"sendEditMessageNotification": false,
"sendDeleteMessageNotification": false,
"sendThreadedMessageNotification": true,
"sendIncomingCallNotification": true,
"sendMissedCallNotification": true,
"sendMemberJoinedNotification": true,
"sendMemberLeftNotification": true,
"sendMemberKickedNotification": true,
"sendMemberBannedNotification": true,
"sendMemberUnbannedNotification": true,
"sendMemberAddedNotification": true,
"sendMemberScopeChangedNotification": false,
"keyId": "key_id",
"teamId": "team_id",
"bundleId": "bundle_id",
"appId": "abcd",
"cometchatMessagePayloadOptions": {
"skipSenderMetadata": false,
"skipReceiverMetadata": false,
"skipMessageMetadata": false,
"trimMessageText": true
}
}
}'
{
"settings": {
"version": 2,
"pushProvider": 1,
"fcmCredentials": {
"project_id": "project_id",
"client_email": "client_email",
"private_key": "private_key",
"private_key_id": "private_key_id"
},
"notificationInPayload": {
"web": true,
"android": true,
"ionic_cordova": true,
"react_native": false,
"ios": true,
"flutter": true
},
"useP8": true,
"sendApnsProduction": true,
"sendNewMessageNotification": true,
"sendEditMessageNotification": false,
"sendDeleteMessageNotification": false,
"sendThreadedMessageNotification": true,
"sendIncomingCallNotification": true,
"sendMissedCallNotification": true,
"sendMemberJoinedNotification": true,
"sendMemberLeftNotification": true,
"sendMemberKickedNotification": true,
"sendMemberBannedNotification": true,
"sendMemberUnbannedNotification": true,
"sendMemberAddedNotification": true,
"sendMemberScopeChangedNotification": false,
"keyId": "key_id",
"teamId": "team_id",
"bundleId": "bundle_id",
"appId": "abcd",
"cometchatMessagePayloadOptions": {
"skipSenderMetadata": false,
"skipReceiverMetadata": false,
"skipMessageMetadata": false,
"trimMessageText": true
}
}
}
Push notification : Store new settings for Push notifications extension
curl --request POST \
--url https://apimgmt.cometchat.io/apps/{appId}/extensions/push-notification/v1/settings \
--header 'Content-Type: application/json' \
--header 'key: <key>' \
--header 'secret: <secret>' \
--data '{
"settings": {
"version": 2,
"pushProvider": 1,
"fcmCredentials": {
"project_id": "project_id",
"client_email": "client_email",
"private_key": "private_key",
"private_key_id": "private_key_id"
},
"notificationInPayload": {
"web": true,
"android": true,
"ionic_cordova": true,
"react_native": false,
"ios": true,
"flutter": true
},
"useP8": true,
"sendApnsProduction": true,
"sendNewMessageNotification": true,
"sendEditMessageNotification": false,
"sendDeleteMessageNotification": false,
"sendThreadedMessageNotification": true,
"sendIncomingCallNotification": true,
"sendMissedCallNotification": true,
"sendMemberJoinedNotification": true,
"sendMemberLeftNotification": true,
"sendMemberKickedNotification": true,
"sendMemberBannedNotification": true,
"sendMemberUnbannedNotification": true,
"sendMemberAddedNotification": true,
"sendMemberScopeChangedNotification": false,
"keyId": "key_id",
"teamId": "team_id",
"bundleId": "bundle_id",
"appId": "abcd",
"cometchatMessagePayloadOptions": {
"skipSenderMetadata": false,
"skipReceiverMetadata": false,
"skipMessageMetadata": false,
"trimMessageText": true
}
}
}'
{
"settings": {
"version": 2,
"pushProvider": 1,
"fcmCredentials": {
"project_id": "project_id",
"client_email": "client_email",
"private_key": "private_key",
"private_key_id": "private_key_id"
},
"notificationInPayload": {
"web": true,
"android": true,
"ionic_cordova": true,
"react_native": false,
"ios": true,
"flutter": true
},
"useP8": true,
"sendApnsProduction": true,
"sendNewMessageNotification": true,
"sendEditMessageNotification": false,
"sendDeleteMessageNotification": false,
"sendThreadedMessageNotification": true,
"sendIncomingCallNotification": true,
"sendMissedCallNotification": true,
"sendMemberJoinedNotification": true,
"sendMemberLeftNotification": true,
"sendMemberKickedNotification": true,
"sendMemberBannedNotification": true,
"sendMemberUnbannedNotification": true,
"sendMemberAddedNotification": true,
"sendMemberScopeChangedNotification": false,
"keyId": "key_id",
"teamId": "team_id",
"bundleId": "bundle_id",
"appId": "abcd",
"cometchatMessagePayloadOptions": {
"skipSenderMetadata": false,
"skipReceiverMetadata": false,
"skipMessageMetadata": false,
"trimMessageText": true
}
}
}
AppID in which the extension has to be enabled/disabled
Save Push Notification Settings
The response is of type object
.