fork download
  1. function getKakaoJWTToken()
  2. {
  3. $url = "https://a...content-available-to-author-only...o.com/v1/token";
  4. $header = array(
  5. "Content-Type: application/json",
  6. 'Authorization: Basic ' . base64_encode('{비즈뿌리오계정:비즈뿌리오비밀번호}'),
  7. );
  8. $response = curl($url, json_encode(array('grant_type' => 'client_credentials')), $header);
  9.  
  10. $arr = json_decode($response, true);
  11. return $arr['accesstoken'];
  12. }
Success #stdin #stdout 0.02s 25712KB
stdin
Standard input is empty
stdout
function getKakaoJWTToken()
{
    $url = "https://a...content-available-to-author-only...o.com/v1/token";
    $header = array(
        "Content-Type: application/json",
        'Authorization: Basic ' . base64_encode('{비즈뿌리오계정:비즈뿌리오비밀번호}'),
    );
    $response = curl($url, json_encode(array('grant_type' => 'client_credentials')), $header);

    $arr = json_decode($response, true);
    return $arr['accesstoken'];
}