快速測試自訂訊息
最新更新:2022-11-29
後台傳送自訂訊息
傳送合集:電腦上下載 postMan 然後軟件左上方 import-link:https://www.getpostman.com/collections/618d2460851f697dc22c
自訂訊息格式如下:
curl --location --request POST 'http://pricloud-master-api.glqas.mtpushoa.com/v3/push' \
--header 'Authorization: Basic MWM0Yjc0OWExN2Y2YWNhMzM5NjBhNTYwOjQ5ZjlkODI2MDExMmI0YmVlMDVhMzQzOA==' \
--header 'Content-Type: application/json' \
--data-raw '{"platform":"android","audience": {"registration_id": ["1a0018970ab4981bc47"]
},
"message": {
"content_type": "text",
"title": "custom_title",
"msg_content": "custom_content",
"extras": {"key": "value"}
}
}'
curl --location --request POST 'http://pricloud-master-api.glqas.mtpushoa.com/v3/push' \
--header 'Authorization: Basic MWM0Yjc0OWExN2Y2YWNhMzM5NjBhNTYwOjQ5ZjlkODI2MDExMmI0YmVlMDVhMzQzOA==' \
--header 'Content-Type: application/json' \
--data-raw '{"platform":"android","audience": {"registration_id": ["1a0018970ab4981bc47"]
},
"message": {
"content_type": "text",
"title": "custom_title",
"msg_content": "custom_content",
"extras": {"key": "value"}
}
}'
此代碼塊在浮窗中顯示
參數說明
參數 | 類型 | 定義 |
---|---|---|
content_type | String | 可選,自訂內容類型 |
title | String | 可選,自訂標題 |
msg_content | String | 必須,自訂內容 |
extras | JsonObject | 可選,自訂額外字段,key/value 格式均為 String |