HMS Push Kit - Data Message to Notification
(using Postman)
Url: https://login.cloud.huawei.com/oauth2/v2/token
Body:
grant_type:client_credentials
client_id:CLIENT_ID
client_secret:CLIENT_SECRET
Url: https://oauth-login.cloud.huawei.com/oauth2/v3/token
Body:
grant_type:client_credentials
client_id:CLIENT_ID
client_secret:CLIENT_SECRET
Url: https://push-api.cloud.huawei.com/v1/APP_ID/messages:send
Authorization:
Bearer TOKEN
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"
]
}
}