전체 토픽 구독 해제
Last updated
Last updated
POST
https://api.mint-app.com/v1/topic/unsubscribe_all
사용자 아이디는 반드시 MintApp.setUser 이후에 api를 사용해야한다.
Name | Type | Description |
---|---|---|
{
"result": "success",
"data": "https://push-link.domain.com/12345"
"message" : "인증번호를 전송하였습니다."
}
{
"result": "failed",
"reason": "유효하지 않은 키값입니다."
}
{
"result": "failed",
"reason": "존재하지 않는 사용자입니다."
}
curl --location --request POST 'https://api.mint-app.com/v1/topic/unsubscribe_all' \
--header 'Accept: application/json' \
--header 'api-key: {api-key}' \
--header 'api-secret: {api-sercret}' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'user_id=3'
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.mint-app.com/v1/topic/unsubscribe_all',
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 => 'user_id=3',
CURLOPT_HTTPHEADER => array(
'Accept: application/json',
'api-key: {api-key}',
'api-secret: {api-sercret}',
'Content-Type: application/x-www-form-urlencoded'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/x-www-form-urlencoded");
RequestBody body = RequestBody.create(mediaType, "user_id=3");
Request request = new Request.Builder()
.url("https://api.mint-app.com/v1/topic/unsubscribe_all")
.method("POST", body)
.addHeader("Accept", "application/json")
.addHeader("api-key", "{api-key}")
.addHeader("api-secret", "{api-sercret}")
.addHeader("Content-Type", "application/x-www-form-urlencoded")
.build();
Response response = client.newCall(request).execute();
user_id
string
로그인한 사용자의 아이디
type
string
민트앱에서 생성된 토픽 종류