POST /oauth/token HTTP/1.1
Host: kauth.kakao.com
Content-type: application/x-www-form-urlencoded;charset=utf-8
이 API를 이용하는데 리턴값이 아무것도 넘어오지 않습니다.
무슨 문제일까요?
PHP로 작업중입니다.
$params = array(
"grant_type" => "authorization_code",
"client_id" => $this->api->client_id,
"redirect_uri" => $this->api->redirect_uri,
"code" => $code
);
$this->http_info = array();
$ch = curl_init();
$this->api->curl_header = "Content-type: application/x-www-form-urlencoded;charset=utf-8";
curl_setopt($ch, CURLOPT_URL , $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_TIMEOUT , 36000);
curl_setopt($ch, CURLOPT_USERAGENT , $this->api->curl_useragent);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $this->api->curl_connect_time_out);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, $this->api->curl_ssl_verifypeer);
curl_setopt($ch, CURLOPT_HTTPHEADER , $this->api->curl_header);
if ( $this->api->curl_proxy ) {
curl_setopt( $ch, CURLOPT_PROXY, $this->curl_proxy);
}
if ( $type == "POST" ) {
curl_setopt($ch, CURLOPT_POST, 1);
if ($params) curl_setopt( $ch, CURLOPT_POSTFIELDS, http_build_query($params) );
}
$response = curl_exec($ch);