Add an FCM push configuration
Registers an FCM (Firebase Cloud Messaging) push configuration for client apps. To send push notifications to Android devices, you should first register the FCM push configuration. You can also register the configurations on the Sendbird Dashboard under Settings > Chat > Push notifications.
Register a service account key
You can register a service account key for FCM HTTP v1 API on Sendbird Dashboard. For instructions, see this FCM migration guide.
HTTP request
Request body
The following table lists the properties of an HTTP request that this action supports.
Properties
Required | Type | Description |
---|---|---|
service_account_key | file | In the form of a |
Optional | Type | Description |
---|---|---|
push_sound | string | Specifies the name of a sound file to be played when a push notification is delivered to client apps. The file should be located in the |
Response
If successful, this action returns the information about the registered FCM push configuration in the response body.
List of response properties
Property name | Type | Description |
---|---|---|
push_configurations[] | array of objects | A list of FCM, HMS, or APNs push configurations. |
push_configurations.(provider).id | string | A unique provider ID of the push configuration. This is automatically generated by Sendbird. |
push_configurations.(provider).push_type | string | The type of the push configuration. |
push_configurations.(provider).project_id | string | The project_id of service_account_key. |
push_configurations.(provider).private_key_id | string | The push_configurations of service_account_key. |
push_configurations.(provider).push_sound | string | The name of a sound file to be played when a push notification is delivered to client apps. |
In the case of an error, an error object is returned. A detailed list of error codes is available here.