Я не могу получить токены доступа с помощью этой конечной точки. 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);
Кто-нибудь может мне помочь?