민트앱
  • 안녕하세요
  • 시작하기
    • 1.프로젝트 생성
    • 2.프로젝트 설정
    • 3.스토어 정보
    • 4.고객요청
  • 민트앱의 특징
  • 민트앱 사용법
    • 0.콘솔 출력(디버깅)
    • 1.프로젝트 시작하기
    • 2.앱 테스트하기
      • ios
      • 안드로이드
    • 연장하기
    • 결제 방법
    • 유지보수
  • Code
    • user-agent
    • frame
    • html
    • javascript
    • 애니스포츠 javascript
    • nawiz javascript
  • Push API
    • 인증
    • 개인 전송
    • 그룹전송(JSON)
    • 그룹전송(CSV)
    • 토픽전송
  • Data API
    • 토픽 CRUD
    • 인증
    • 딥링크 생성
    • 토픽 구독
    • 토픽 구독 해제
    • 전체 토픽 구독 해제
  • 딥링크
    • firebase dynamic 딥링크
    • URI Scheme 딥링크
  • 소셜로그인
    • 애플로 로그인
    • 소셜로그인 사용법
    • 구글 로그인 설정
    • 카카오 로그인 설정
    • 네이버 로그인
    • 페이스북 로그인
  • 토픽
  • 카테고리
    • ios
    • 안드로이드
  • Conents
    • Release Note
    • 이용약관
    • 개인정보처리방침
  • 파일
    • 스플래쉬 mp4,gif,lottie
    • 스플래쉬
    • 앱아이콘
    • 애플 스크린샷 샘플
    • 안드로이드 스크린샷 샘플
    • 스크린샷 샘플
  • 스플래쉬 동작원리
  • 공지사항
  • 플러그인
    • 그누보드 매뉴얼
  • 상담
  • 인증서
Powered by GitBook
On this page
  • 토픽 구독 해제 생성
  • sample

Was this helpful?

  1. Data API

토픽 구독 해제

토픽 구독 해제 생성

POST https://api.mint-app.com/v1/topic/unsubscribe

사용자 아이디는 반드시 MintApp.setUser 이후에 api를 사용해야한다.

Request Body

Name
Type
Description

user_id

string

로그인한 사용자의 아이디

type

string

민트앱에서 생성된 토픽 종류

{
    "result": "success",
    "data": "https://push-link.domain.com/12345"
    "message" : "인증번호를 전송하였습니다."
}
{
    "result": "failed",
    "reason": "유효하지 않은 키값입니다."
}
{
    "result": "failed",
    "reason": "존재하지 않는 사용자입니다."
}

sample

curl --location --request POST 'https/api.mint-app.com/v1/topic/unsubscribe' \
--header 'Accept: application/json' \
--header 'api-key: {api-key}' \
--header 'api-secret: {api-secret}' \
--form 'user_id="3"' \
--form 'type="gender_male"'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https:/api.mint-app.com/v1/topic/unsubscribe',
  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('user_id' => '3','type' => 'gender_male'),
  CURLOPT_HTTPHEADER => array(
    'Accept: application/json',
    'api-key: {api-key}',
    'api-secret: {api-secret}'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = new MultipartBody.Builder().setType(MultipartBody.FORM)
  .addFormDataPart("user_id","3")
  .addFormDataPart("type","gender_male")
  .build();
Request request = new Request.Builder()
  .url("https:/api.mint-app.com/v1/topic/unsubscribe")
  .method("POST", body)
  .addHeader("Accept", "application/json")
  .addHeader("api-key", "{api-key}")
  .addHeader("api-secret", "{api-secret}")
  .build();
Response response = client.newCall(request).execute();
Previous토픽 구독Next전체 토픽 구독 해제

Last updated 3 years ago

Was this helpful?