시스템 발송 한도 증가 요청

Request

1
POST https://api.coolsms.co.kr/quota/v1/me/system
Copied!
시스템 발송 한도 증가 요청을 보냅니다.

Authorization 인증 필요 [?]

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

Request Structure

1
{
2
"quota": "number",
3
"reasonRequested": "string",
4
"fileIds": "array"
5
}
Copied!

Body Params

Name
Type
Required
Description
quota
number
O
원하는 쿼터 목표값
reasonRequested
string
요청 사유
fileIds
array
O
증빙 자료 목록

Samples

시스템 쿼터 증가 요청

Sample Request
1
{
2
"quota": 10000,
3
"fileIds": [
4
"ST01FE20dk20yk20vbodjaoekfoekale"
5
],
6
"reasonRequested": "12312"
7
}
Copied!
Sample Response
1
{
2
"status": "PENDING",
3
"fileIds": [
4
"ST01FE20dk20yk20vbodjaoekfoekale"
5
],
6
"reasonRequested": "12312",
7
"reasonRejected": null,
8
"handleKey": "QT01IQ191230000031917Afkzwzma97H",
9
"accountId": "19203248728392",
10
"requestedQuota": 10000,
11
"dateCreated": "2019-12-30T00:00:31.918Z",
12
"dateUpdated": "2019-12-30T00:00:31.918Z"
13
}
Copied!
Sample Code
NODE
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
quota: 10000,
11
fileIds: 'ST01FE20dk20yk20vbodjaoekfo...',
12
reasonRequested: '12312'
13
},
14
method: 'POST',
15
json: true,
16
url: 'http://api.coolsms.co.kr/quota/v1/me/system'
17
};
18
19
request(options, function(error, response, body) {
20
if (error) throw error;
21
console.log('result :', body);
22
});
Copied!
1
<?php
2
$url = "http://api.coolsms.co.kr/quota/v1/me/system";
3
$data = '{"quota":10000,"fileIds":"ST01FE20dk20yk20vbodjaoekfo...","reasonRequested":"12312"}';
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.coolsms.co.kr/quota/v1/me/system"
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 = '{"quota":10000,"fileIds":"ST01FE20dk20yk20vbodjaoekfo...","reasonRequested":"12312"}'
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 '{"quota":10000,"fileIds":"ST01FE20dk20yk20vbodjaoekfo...","reasonRequested":"12312"}' \
6
http://api.coolsms.co.kr/quota/v1/me/system
Copied!
1
require 'net/http'
2
require 'uri'
3
require 'json'
4
5
uri = URI.parse("http://api.coolsms.co.kr/quota/v1/me/system")
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
"quota": 10000,
13
"fileIds": "ST01FE20dk20yk20vbodjaoekfo...",
14
"reasonRequested": "12312"
15
}
16
http = Net::HTTP.new(uri.host, uri.port)
17
request = Net::HTTP::Post.new(uri.request_uri, headers)
18
request.body = data.to_json
19
20
response = http.request(request)
21
puts response.code
22
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.coolsms.co.kr/quota/v1/me/system"
12
data := strings.NewReader(`{"quota":10000,"fileIds":"ST01FE20dk20yk20vbodjaoekfo...","reasonRequested":"12312"}`)
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 coolsms;
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.coolsms.co.kr/quota/v1/me/system";
12
String parameters = "{\"quota\":10000,\"fileIds\":\"ST01FE20dk20yk20vbodjaoekfo...\",\"reasonRequested\":\"12312\"}";
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-12-30
Last modified 1yr ago