Chat / Platform API
Current version: v3
    Chat Platform API v3
    Chat Platform API
    Chat
    Platform API
    Home
    /
    Chat
    /
    Platform API
    /
    Application

    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 > Notifications.


    HTTP request

    POST https://api-{application_id}.sendbird.com/v3/applications/push/fcm
    

    Request body

    The following table lists the properties of an HTTP request that this action supports.

    Properties
    RequiredTypeDescription

    api_key

    string

    Specifies the FCM server key.

    OptionalTypeDescription

    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 /res/raw folder.


    Response

    If successful, this action returns the information about the registered FCM push configuration in the response body.

    {
        "push_configurations": [
            {
                "id": "d2364415c208c0d0799e6247b24f89fd408944e2",
                "push_type": "FCM",
                "api_key": "AAAAH590fM0:APA91bEhMR1tgiOSLwD-3ubaFEjyivw-c3G1FNmtF-V57J8v0rvDkTuzKfy_0oCcVmUvVyAyDgYQO6qqH-4nyiIvirlj3rpJLACCI2u_hCKUfNCIUOm-gHtHQL_H8S-OUlIdGynFl9u1",
                "push_sound": "ring.swf"
            }
        ]
    }
    

    List of response properties

    Property nameTypeDescription

    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).api_key

    string

    The registered FCM server 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.