API de validation des notifications push
Fonction
Cette API valide une requête push sans envoyer de message aux utilisateurs. Ses paramètres sont identiques à ceux de l’API de création de notifications push.
Point de terminaison
POST /v4/push/validate
POST /v4/push/validate
Afficher ce bloc de code dans la fenêtre flottante
Authentification
Consultez l’authentification dans la présentation de l’API REST.
Exemple de requête
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)>
Afficher ce bloc de code dans la fenêtre flottante
Corps de la requête
{
"from": "push",
"to": "all",
"body": {
"platform": "web",
"notification": {
"alert": "Hi,MTPush !",
"web": {
"alert": "web_push",
"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": "web_push",
"title": "web_push",
"url": "http://www.google.com",
"extras": {
"web-key1": "web-value1"
}
}
}
},
"request_id": "12345678",
"custom_args": {
"business": "info"
}
}
Afficher ce bloc de code dans la fenêtre flottante
Exemple de réponse
{
"request_id": "18",
"msg_id": "1828256757"
}
{
"request_id": "18",
"msg_id": "1828256757"
}
Afficher ce bloc de code dans la fenêtre flottante










