SOLAPI
Search…
발신번호 중복 해제 요청

Request

1
POST https://api.solapi.com/senderid/v1/papers/duplicate/:phoneNumber
Copied!
발신번호 상태가 중복('DUPLICATED')일 경우 중복 해제를 위한 요청입니다.

Authorization 인증 필요 [?]

계정 권한
회원 권한
계정 상태
회원 상태
계정 인증
senderid:write
role-senderid:write
ACTIVE
ACTIVE
O

Path Parameters

Name
Description
:phoneNumber
핸드폰 번호

Request Structure

1
{
2
"reason": "string",
3
"name": "string"
4
}
Copied!

Body Params

Name
Type
Required
Description
reason
string
O
중복 해제 이유
name
string
이름

Samples

createDuplicateSenderIds.spec.js

Sample Request
1
{
2
"reason": "부서에 따른 아이디 할당을 위해 필요"
3
}
Copied!
Sample Response
1
{
2
"limit": 2,
3
"accountId": "12925149",
4
"senderIds": [
5
{
6
"unlockDuplicate": {
7
"duplicateId": "DUP20191029025925BPD1RFEHPNUKU50",
8
"reason": null,
9
"reasonForRequested": "부서에 따른 아이디 할당을 위해 필요",
10
"name": null,
11
"status": "PENDING",
12
"dateCreated": "2019-10-28T17:59:25.756Z",
13
"dateUpdated": "2019-10-28T17:59:25.756Z"
14
},
15
"status": "PENDING",
16
"expireAt": null,
17
"method": null,
18
"log": [
19
{
20
"createAt": "2019-10-28T17:59:25.756Z",
21
"message": "중복 해제 요청을 하였습니다.\n담당자명: undefined\n사유: 부서에 따른 아이디 할당을 위해 필요"
22
}
23
],
24
"dateCreated": "2019-10-28T17:59:25.749Z",
25
"dateUpdated": "2019-10-28T17:59:25.756Z",
26
"approvalDocuments": [],
27
"handleKey": "SED20181030105615MMXDST163SYMMX2",
28
"phoneNumber": "01000000000"
29
}
30
],
31
"limitationDocuments": [],
32
"dateCreated": "2019-10-28T17:59:25.750Z",
33
"dateUpdated": "2019-10-28T17:59:25.757Z"
34
}
Copied!
Sample Code
NODE
JQUERY
PHP
PYTHON
CURL
RUBY
GO
JAVA
1
var request = require('request');
2
3
var options = {
4
headers: {
5
Authorization:
6
'HMAC-SHA256 apiKey=NCSAYU7YDBXYORXC, date=2019-07-01T00:41:48Z, salt=jqsba2jxjnrjor, signature=1779eac71a24cbeeadfa7263cb84b7ea0af1714f5c0270aa30ffd34600e363b4',
7
'Content-Type': 'application/json'
8
},
9
body: {
10
reason: '부서에 따른 아이디 할당을 위해 필요'
11
},
12
method: 'POST',
13
json: true,
14
url: 'http://api.solapi.com/senderid/v1/papers/duplicate/01000000000'
15
};
16
17
request(options, function(error, response, body) {
18
if (error) throw error;
19
console.log('result :', body);
20
});
Copied!
1
var options = {
2
headers: {
3
Authorization:
4
'HMAC-SHA256 apiKey=NCSAYU7YDBXYORXC, date=2019-07-01T00:41:48Z, salt=jqsba2jxjnrjor, signature=1779eac71a24cbeeadfa7263cb84b7ea0af1714f5c0270aa30ffd34600e363b4',
5
'Content-Type': 'application/json'
6
},
7
body: {
8
reason: '부서에 따른 아이디 할당을 위해 필요'
9
},
10
method: 'POST',
11
url: 'http://api.solapi.com/senderid/v1/papers/duplicate/01000000000'
12
};
13
14
$.ajax(options).done(function(response) {
15
console.log(response);
16
});
Copied!
1
<?php
2
$url = "http://api.solapi.com/senderid/v1/papers/duplicate/01000000000";
3
$data = '{"reason":"부서에 따른 아이디 할당을 위해 필요"}';
4
5
$options = array(
6
'http' => array(
7
'header' => "Authorization: HMAC-SHA256 apiKey=NCSAYU7YDBXYORXC, date=2019-07-01T00:41:48Z, salt=jqsba2jxjnrjor, signature=1779eac71a24cbeeadfa7263cb84b7ea0af1714f5c0270aa30ffd34600e363b4\r\n" . "Content-Type: application/json\r\n",
8
'content' => $data,
9
'method' => 'POST'
10
)
11
);
12
13
$context = stream_context_create($options);
14
$result = file_get_contents($url, false, $context);
15
16
var_dump($result);
Copied!
1
import requests
2
3
url = "http://api.solapi.com/senderid/v1/papers/duplicate/01000000000"
4
headers = {
5
"Authorization": "HMAC-SHA256 apiKey=NCSAYU7YDBXYORXC, date=2019-07-01T00:41:48Z, salt=jqsba2jxjnrjor, signature=1779eac71a24cbeeadfa7263cb84b7ea0af1714f5c0270aa30ffd34600e363b4",
6
"Content-Type": "application/json"
7
}
8
data = '{"reason":"부서에 따른 아이디 할당을 위해 필요"}'
9
10
response = requests.post(url, headers=headers, data=data)
11
print(response.status_code)
12
print(response.text)
Copied!
1
#!/bin/bash
2
curl -X POST \
3
-H 'Authorization: HMAC-SHA256 apiKey=NCSAYU7YDBXYORXC, date=2019-07-01T00:41:48Z, salt=jqsba2jxjnrjor, signature=1779eac71a24cbeeadfa7263cb84b7ea0af1714f5c0270aa30ffd34600e363b4' \
4
-H 'Content-Type: application/json' \
5
-d '{"reason":"부서에 따른 아이디 할당을 위해 필요"}' \
6
http://api.solapi.com/senderid/v1/papers/duplicate/01000000000
Copied!
1
require 'net/http'
2
require 'uri'
3
require 'json'
4
5
uri = URI.parse("http://api.solapi.com/senderid/v1/papers/duplicate/01000000000")
6
7
headers = {
8
"Authorization": "HMAC-SHA256 apiKey=NCSAYU7YDBXYORXC, date=2019-07-01T00:41:48Z, salt=jqsba2jxjnrjor, signature=1779eac71a24cbeeadfa7263cb84b7ea0af1714f5c0270aa30ffd34600e363b4",
9
"Content-Type": "application/json"
10
}
11
data = {
12
"reason": "부서에 따른 아이디 할당을 위해 필요"
13
}
14
http = Net::HTTP.new(uri.host, uri.port)
15
request = Net::HTTP::Post.new(uri.request_uri, headers)
16
request.body = data.to_json
17
18
response = http.request(request)
19
puts response.code
20
puts response.body
Copied!
1
package main
2
3
import (
4
"fmt"
5
"io/ioutil"
6
"net/http"
7
"strings"
8
)
9
10
func main() {
11
uri := "http://api.solapi.com/senderid/v1/papers/duplicate/01000000000"
12
data := strings.NewReader(`{"reason":"부서에 따른 아이디 할당을 위해 필요"}`)
13
14
req, err := http.NewRequest("POST", uri, data)
15
if err != nil { panic(err) }
16
17
req.Header.Set("Authorization", "HMAC-SHA256 apiKey=NCSAYU7YDBXYORXC, date=2019-07-01T00:41:48Z, salt=jqsba2jxjnrjor, signature=1779eac71a24cbeeadfa7263cb84b7ea0af1714f5c0270aa30ffd34600e363b4")
18
req.Header.Set("Content-Type", "application/json")
19
20
client := &http.Client{}
21
resp, err := client.Do(req)
22
if err != nil { panic(err) }
23
defer resp.Body.Close()
24
25
bytes, _ := ioutil.ReadAll(resp.Body)
26
str := string(bytes)
27
fmt.Println(str)
28
}
Copied!
1
package solapi;
2
3
import java.io.BufferedReader;
4
import java.io.DataOutputStream;
5
import java.io.InputStreamReader;
6
import java.net.HttpURLConnection;
7
import java.net.URL;
8
9
public class Request {
10
public static void main(String[] args) throws Exception {
11
String targetUrl = "http://api.solapi.com/senderid/v1/papers/duplicate/01000000000";
12
String parameters = "{\"reason\":\"부서에 따른 아이디 할당을 위해 필요\"}";
13
14
URL url = new URL(targetUrl);
15
HttpURLConnection con = (HttpURLConnection) url.openConnection();
16
17
con.setRequestMethod("POST");
18
19
con.setRequestProperty("Authorization", "HMAC-SHA256 apiKey=NCSAYU7YDBXYORXC, date=2019-07-01T00:41:48Z, salt=jqsba2jxjnrjor, signature=1779eac71a24cbeeadfa7263cb84b7ea0af1714f5c0270aa30ffd34600e363b4");
20
con.setRequestProperty("Content-Type", "application/json");
21
22
con.setDoOutput(true);
23
DataOutputStream wr = new DataOutputStream(con.getOutputStream());
24
wr.writeBytes(parameters);
25
wr.flush();
26
wr.close();
27
28
int responseCode = con.getResponseCode();
29
BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()));
30
String line;
31
StringBuffer response = new StringBuffer();
32
while ((line = in.readLine()) != null) {
33
response.append(line);
34
}
35
in.close();
36
37
System.out.println("HTTP response code : " + responseCode);
38
System.out.println("HTTP body : " + response.toString());
39
}
40
}
Copied!
문서 생성일 : 2019-10-28
Last modified 1yr ago