hi,
I’m trying to refresh my access token with that PHP script, shown like here:
my php code to send the POST request is :
$client_id = 'XXX';
$client_secret = 'XXX';
$url = 'https://id.twitch.tv/oauth2/token';
$data = array('client_id' => $client_id, 'client_secret' => $client_secret, 'grant_type' => 'client_credentials');
$options = array(
'http' => array(
'header' => "Content-type: application/x-www-form-urlencoded\r\n",
'method' => 'POST',
'content' => http_build_query($data)
)
);
$context = stream_context_create($options);
$result = file_get_contents($url, false, $context);
if ($result === FALSE) {}
var_dump($result);
But I get this “error”:
bool(false)
The script worked 2 month ago. did they changed something ?