Logo Site EngageLab Full Black
聯繫銷售

推播校驗 API

功能說明

此 API 僅驗證推播請求,不會向使用者傳送訊息。請求參數與 建立推播 API 相同。

呼叫地址

POST /v4/push/validate
              
              POST /v4/push/validate

            
此代碼塊在浮窗中顯示

呼叫驗證

驗證方式請參閱 REST API 概述。

請求範例

POST /v4/push/validate HTTP/1.1 Content-Type: application/json Authorization: Basic <base64(appKey:appSecret)>
              
              POST /v4/push/validate HTTP/1.1
Content-Type: application/json
Authorization: Basic <base64(appKey:appSecret)>

            
此代碼塊在浮窗中顯示

請求主體

{ "from": "push", "to": "all", "body": { "platform": "web", "notification": { "alert": "Hi,MTPush !", "web": { "alert": "Hi,MTPush !", "title": "web_push", "url": "http://www.google.com", "extras": { "web-key1": "web-value1" } } } }, "request_id": "12345678", "custom_args": "business info" }
              
              {
    "from": "push",
    "to": "all",
    "body": {
        "platform": "web",
        "notification": {
            "alert": "Hi,MTPush !",
            "web": {
              "alert": "Hi,MTPush !",
                "title": "web_push",
                "url": "http://www.google.com",
                "extras": {
                    "web-key1": "web-value1"
                }
            }
        }
    },
    "request_id": "12345678",
    "custom_args": "business info"
}

            
此代碼塊在浮窗中顯示

回應範例

{ "request_id": "18", "msg_id": "1828256757" }
              
              {
  "request_id": "18",
  "msg_id": "1828256757"
}

            
此代碼塊在浮窗中顯示
Icon Solid Transparent White Qiyu
聯繫銷售