我无法使用此端点获取访问令牌。 https://www.reddit.com/api/v1/access_token
我的代码是:
$curl = curl_init('https://www.reddit.com/api/v1/access_token');
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, array(
'grant_type' => 'authorization_code',
'code' => $authentication_code,
'redirect_uri' => $redirect_uri
));
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
echo $auth = curl_exec($curl);
有人可以帮助我吗?