/ Platform API
Platform API
    Chat Platform API v3
    Chat Platform API
    Chat Platform API
    Version 3

    Update an FCM push configuration

    Copy link

    Updates a specific FCM (Firebase Cloud Messaging) push configuration for client apps. You can also update the configurations on the Sendbird Dashboard under Settings > Chat > Push notifications.


    Register a service account key

    Copy link

    You can register a service account key for FCM HTTP v1 API on Sendbird Dashboard. For instructions, see this FCM migration guide.


    HTTP request

    Copy link
    PUT https://api-{application_id}.sendbird.com/v3/applications/push/fcm/{provider_id}
    

    Parameters

    Copy link

    The following table lists the parameters that this action supports.

    Required
    Parameter nameTypeDescription

    provider_id

    string

    Specifies the provider ID of the push configuration.


    Request body

    Copy link

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

    Optional
    Property nameTypeDescription

    api_key

    string

    Specifies the FCM server key.

    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.

    service_account_key

    file

    In the form of a multipart/form-data content type, specifies the name of a .JSON file. Sendbird server scans the content of the file and registers the file as its corresponding type. If you upload a wrong file, you will receive an error.

    use_fcm_v1_api

    boolean

    Determines whether to use the HTTP v1 API for the FCM provider.
    - If true: uses the HTTP v1 API.
    - If false: uses the Legacy API.

    If the service account key is not registered, setting this value to true returns error.


    Response

    Copy link

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

    {
        "push_configurations": "d2364415c208c0d0799e6247b24f89fd408944e2"
    }
    
    PropertyTypeDescription

    push_configurations

    string

    A unique provider ID of the updated push configuration.

    In the case of an error, an error object is returned. A detailed list of error codes is available here.