딥링크 생성
url을 다이나믹 링크로 만들기 위한 api 입니다
딥링크 생성
POST
https://api.mint-app.com/v1/dlink
Request Body
Name | Type | Description |
---|---|---|
title | string | 딥링크 제목 |
url | string | push를 클릭했을때 이동 시킬 url |
{
"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/dlink' \
--header 'Accept: application/json' \
--header 'api-key: {api-key}' \
--header 'api-secret: {api-sercret}' \
--form 'url="https://www.domain.com"' \
--form 'title="딥링크 제목"' \
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.mint-app.com/v1/dlink',
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('url' => 'https://www.domain.com',
"title"=>"딥링크 제목"),
CURLOPT_HTTPHEADER => array(
'Accept: application/json',
'api-key: {api-key}',
'api-secret: {api-sercret}'
),
));
$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("url","https://www.domain.com")
.addFormDataPart("title","딥링크 제목")
.build();
Request request = new Request.Builder()
.url("https://api.mint-app.com/v1/dlink")
.method("POST", body)
.addHeader("Accept", "application/json")
.addHeader("api-key", "{api-key}")
.addHeader("api-secret", "{api-sercret}")
.build();
Response response = client.newCall(request).execute();
Last updated