Skip to content

myuksektepe/HMSPushDataMessage

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HMSPushDataMessage

HMS Push Kit - Data Message to Notification

Server Side

(using Postman)



1 - Create Token

1.1 - Using Version 2

Url: https://login.cloud.huawei.com/oauth2/v2/token

Body:

grant_type:client_credentials
client_id:CLIENT_ID
client_secret:CLIENT_SECRET




1.2 - Using Version 3

Url: https://oauth-login.cloud.huawei.com/oauth2/v3/token

Body:

grant_type:client_credentials
client_id:CLIENT_ID
client_secret:CLIENT_SECRET




Send Data Message

Url: https://push-api.cloud.huawei.com/v1/APP_ID/messages:send

Authorization:

Bearer TOKEN





Variables

Variable Description Require
type "notification" or null for "data"
title String *
content String *
small_icon if is null it's mean R.mipmap.ic_launcer. If not, you can select any image from R.drawable.____
style "big_text" for Arama Sonuçları Notification.BigTextStyle or you can set null for normal style
big_text String If you set style of "big_text"
on_click Default is "open_app" or you can write custom value
data Be careful about this variable's type. It is must be String. For example; {\"key\":\"value\",\"key2\":\"value2\"}

Body (Sample):

{
    "validate_only": false,
    "message": {
        "data": "{\"type\": \"notification\", \"style\": \"big_text\", \"title\": \"NOTIFICATION TITLE\", \"content\": \"CONTENT\", \"big_text\": \"Lorem ipsum dolor sit amet, consectetur adipiscing elit.\", \"small_icon\": \"custom_icon\",  \"on_click\": \"open_app\", \"data\": {\"key\":\"value\",\"key2\":\"value2\"} }",
        "token": [
            "DEVICE_TOKEN"
        ]
    }
}

About

HMS Push Kit - Data Message to Notification

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages