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

    Add an HMS push configuration

    Copy link

    Registers an HMS (Huawei Mobile Services) push configuration for client apps. To send push notifications to Android devices for HMS, you should first register the HMS push configuration. You can also register the configurations on the Sendbird Dashboard under Settings > Chat > Push notifications.


    HTTP request

    Copy link
    POST https://api-{application_id}.sendbird.com/v3/applications/push/huawei
    

    Request body

    Copy link

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

    Properties
    RequiredTypeDescription

    huawei_app_id

    string

    Specifies the unique ID of the application registered to the HMS server.

    huawei_app_secret

    string

    Specifies the secret key allocated to the application.

    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

    Copy link

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

    {
        "push_configurations": [
            {
                "id": "fbdd6d0071217ac71b5d8acab65d615cfab3f7b1",
                "push_type": "HUAWEI",
                "huawei_app_id": "123124124",
                "huawei_app_secret": "asd884fdafjdklii303k9mk",
                "push_sound": "hello.swf"
            }
        ]
    }
    

    List of response properties

    Copy link
    Property nameTypeDescription

    push_configurations[]

    array of objects

    An array 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).huawei_app_id

    string

    The unique ID of the app registered to the HMS server.

    push_configurations.(provider).huawei_app_secret

    string

    The HMS secret key of the registered app.

    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.