sckim

id, password

Showing 1 changed file with 6 additions and 4 deletions
...@@ -16,8 +16,10 @@ var languagedetect_api_url = 'https://openapi.naver.com/v1/papago/detectLangs' ...@@ -16,8 +16,10 @@ var languagedetect_api_url = 'https://openapi.naver.com/v1/papago/detectLangs'
16 16
17 // Naver Auth Key 17 // Naver Auth Key
18 //새로 발급받은 naver papago api id, pw 입력 18 //새로 발급받은 naver papago api id, pw 입력
19 -var client_id = process.env.client_id; 19 +var detect_client_id = process.env.detect_client_id;
20 -var client_secret = process.env.client_secret; 20 +var detect_client_secret = process.env.detect_client_secret;
21 +var papago_client_id = process.env.papago_client_id;
22 +var papago_client_secret = process.env.papago_client_secret;
21 const config = { 23 const config = {
22 channelAccessToken: process.env.channelAccessToken, 24 channelAccessToken: process.env.channelAccessToken,
23 channelSecret: process.env.channelSecret, 25 channelSecret: process.env.channelSecret,
...@@ -53,7 +55,7 @@ function handleEvent(event) { ...@@ -53,7 +55,7 @@ function handleEvent(event) {
53 var detect_options = { 55 var detect_options = {
54 url : languagedetect_api_url, 56 url : languagedetect_api_url,
55 form : {'query': event.message.text}, 57 form : {'query': event.message.text},
56 - headers: {'X-Naver-Client-Id': client_id, 'X-Naver-Client-Secret': client_secret} 58 + headers: {'X-Naver-Client-Id': detect_client_id, 'X-Naver-Client-Secret': detect_client_secret}
57 }; 59 };
58 60
59 //papago 언어 감지 61 //papago 언어 감지
...@@ -78,7 +80,7 @@ function handleEvent(event) { ...@@ -78,7 +80,7 @@ function handleEvent(event) {
78 url: translate_api_url, 80 url: translate_api_url,
79 // 한국어(source : ko), 영어(target: en), 카톡에서 받는 메시지(text) 81 // 한국어(source : ko), 영어(target: en), 카톡에서 받는 메시지(text)
80 form: {'source':source, 'target':target, 'text':event.message.text}, 82 form: {'source':source, 'target':target, 'text':event.message.text},
81 - headers: {'X-Naver-Client-Id': client_id, 'X-Naver-Client-Secret': client_secret} 83 + headers: {'X-Naver-Client-Id': papago_client_id, 'X-Naver-Client-Secret': papago_client_secret}
82 }; 84 };
83 85
84 // Naver Post API 86 // Naver Post API
......