키 : 2e3xxxxxxxxxxxxxxxxxx******
AppId: 335178
async onSearchJuso(cmd) {
let URL1 = 'https://dapi.kakao.com/v2/local/search/address.json?query=서울 서초구';
let params1 = {
};
let config1 = {
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
'Authorization': 'KakaoAK ' + '2e347xxxxxxxxxxxxxxxxxxxxxxxxxx'
}
};
axios.defaults.withCredentials = false;
let response1 = await axios.get(URL1, { params: params1 }, config1);
console.log(response1);
}
- response
{“errorType”:“AccessDeniedError”,“message”:“cannot find Authorization : KakaoAK header”}
- 상태값
Request URL: https://dapi.kakao.com/v2/local/search/address.json?query=서울%20서초구
Request Method: GET
Status Code: 401 Unauthorized
Remote Address: 203.217.239.16:443
Referrer Policy: strict-origin-when-cross-origin
Access-Control-Allow-Headers: Authorization, KA, Origin, X-Requested-With, Content-Type, Accept
Access-Control-Allow-Methods: GET, OPTIONS
Access-Control-Allow-Origin: *
Connection: keep-alive
Content-Type: application/json;charset=UTF-8
Date: Mon, 09 Nov 2020 07:57:30 GMT
Server: nginx
Transfer-Encoding: chunked
X-Request-Id: 377a0dd0-2261-11eb-b041-492da67ee468
Accept: application/json, text/plain, /
Accept-Encoding: gzip, deflate, br
Accept-Language: ko-KR,ko;q=0.9,en-US;q=0.8,en;q=0.7
Connection: keep-alive
Host: dapi.kakao.com
Origin: http://localhost:3000
Referer: http://localhost:3000/
Sec-Fetch-Dest: empty
Sec-Fetch-Mode: cors
Sec-Fetch-Site: cross-site
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.183 Safari/537.36
query: 서울 서초구