스윙투앱에서는 발송한 목록에 읽지 않은 메시지에 대한 Count 를 가져오는 API 를 제공하고 있습니다.
사전에 협의되지 않은 방식의 API 사용과 , 무분별한 대량발송의 경우 사용에 제한을 받을 수 있습니다.
var form = new FormData();
form.append("app_id", "app_id");
form.append("app_api_key", "api_key");
form.append("platform", "android");
form.append("user_id", "tets");
var settings = {
"url": "https://www.swing2app.com/swapi/push_unread_count",
"method": "POST",
"timeout": 0,
"processData": false,
"mimeType": "multipart/form-data",
"contentType": false,
"data": form
};
$.ajax(settings).done(function (response) {
console.log(response);
});
Unirest.setTimeouts(0, 0);
HttpResponse<String> response = Unirest.post("https://www.swing2app.com/swapi/push_unread_count")
.multiPartContent()
.field("app_id", "app_id")
.field("app_api_key", "api_key")
.field("platform", "AND")
.field("user_id", "test_user")
.asString();
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://www.swing2app.com/swapi/push_unread_count',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => array('app_id' => 'app_id','app_api_key' => 'api_key','user_id' => 'test_user','platform' => 'AND'),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
아래의 Postman 링크를 참고하여 각 언어별 사용예제를 참고해보세요