유저의 앱 연결해제 요청건으로 안드로이드 수정이 불가한 상황이라
현재 한명의 유저에 대해서 탈퇴처리를 위해 curl 를 사용하여 adminkey 와 id 를 호출했습니다.
아래와 같이 명령어를 날리고 실행하는데,
C:\Windows\System32> curl -v -X POST https://kapi.kakao.com/v1/user/unlink -H
“Authorization: KakaoAK 1fbf20bc305a2301b1ffbf757XXXXXXX” -d ‘target_id_type=us
er_id&target_id=80111XXX’
아래 이어서 메시지가 나오면서 실행에러가 뜨는것 같은데, 어떤 문제인가요?
adminkey 와 user_id 뒷부분은 여기서는 보안상 xxx 처리했습니다…
맨 아래 부분 메세지 상에는 no authentication key 라는데, 이 부분은
KakaoAK 1fbf20bc305a2301b1ffbf757XXXXXXX <= 이게 adminkey 가 안맞아서 그런것인지 …모르겠네요
adminkey 는
Note: Unnecessary use of -X or --request, POST is already inferred.
- Trying 103.246.57.80…
- Connected to kapi.kakao.com (103.246.57.80) port 443 (#0)
- ALPN, offering h2
- ALPN, offering http/1.1
- Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH
- successfully set certificate verify locations:
- CAfile: C:\Windows\System32\ca-bundle.crt
CApath: none - TLSv1.2 (OUT), TLS header, Certificate Status (22):
- TLSv1.2 (OUT), TLS handshake, Client hello (1):
- TLSv1.2 (IN), TLS handshake, Server hello (2):
- TLSv1.2 (IN), TLS handshake, Certificate (11):
- TLSv1.2 (IN), TLS handshake, Server key exchange (12):
- TLSv1.2 (IN), TLS handshake, Server finished (14):
- TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
- TLSv1.2 (OUT), TLS change cipher, Client hello (1):
- TLSv1.2 (OUT), TLS handshake, Finished (20):
- TLSv1.2 (IN), TLS change cipher, Client hello (1):
- TLSv1.2 (IN), TLS handshake, Finished (20):
- SSL connection using TLSv1.2 / ECDHE-RSA-AES256-GCM-SHA384
- ALPN, server did not agree to a protocol
- Server certificate:
- subject: C=KR; ST=Jeju-do; L=Jeju-si; O=Kakao Corp.; CN=*.kakao.com
- start date: Nov 11 00:00:00 2015 GMT
- expire date: Nov 10 23:59:59 2017 GMT
- subjectAltName: host “kapi.kakao.com” matched cert’s “*.kakao.com”
- issuer: C=US; O=thawte, Inc.; CN=thawte SSL CA - G2
- SSL certificate verify ok.
POST /v1/user/unlink HTTP/1.1
Host: kapi.kakao.com
User-Agent: curl/7.48.0
Accept: /
Authorization: KakaoAK 1fbf20bc305a2301b1ffbf757xxxxx
Content-Length: 23
Content-Type: application/x-www-form-urlencoded
- upload completely sent off: 23 out of 23 bytes
< HTTP/1.1 401 Unauthorized
< Date: Thu, 31 Mar 2016 07:02:12 GMT
< Server: Apache
< WWW-Authenticate: KakaoAK
< Content-Type: application/json;charset=UTF-8
< Content-Length: 44
<
{“code”:-401,“msg”:“no authentication key!”}* Connection #0 to host kapi.kakao.c
om left intact