- 요청
$kakaoLoginUrl = “https://kauth.kakao.com/oauth/authorize?client_id=".$restAPIKey."&redirect_uri=".$callbacURI."&response_type=code”;
콜백 주소도 개발자홈에 정확히 입력한상태입니다.
일단, 토큰발급을 받을수 있는 코드를 받아온 후 콜백 주소에서 토큰발행을 못하고 있습니다.
- 응답
$returnUrl = “https://kauth.kakao.com/oauth/token?grant_type=authorization_code&client_id=".$restAPIKey."&redirect_uri=".$callbacURI."&code=”.$returnCode;
$isPost = false;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $returnUrl);
curl_setopt($ch, CURLOPT_POST, $isPost);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$loginResponse = curl_exec ($ch);
$status_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
응답코드 status_code= 0 이고
토큰은 널입니다.
localhost 에선 잘되고, 서버에 올려서 요청하면 응답이 없습니다.
리턴URL 및 도메인 입력은 잘 되어있습니다.
왜그럴까요? ㅠ