Authorizations
API Key with fullAccess scope(i.e. Rest API Key from the Dashboard).
Body
application/json
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).
Was this page helpful?