I try to get an authorization_code with https://api.twitch.tv/kraken/oauth2/token with correct params but it return JSON code with status 404, it is normal ? I have try with /helix and /api but issue is same…
People know a solution with my issue ?
Yes, i have already make the same request before but now i have always 404 response code…
I try with some system but currently the result is same, 404 response code
Any people can confirm i can get access_token with curl in php ?
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.twitch.tv/kraken/oauth2/token');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query([
'client_id' => $CLID,
'client_secret' => $SECRET,
'grant_type' => 'authorization_code',
'redirect_uri' => $REDIRECT_URI,
'code' => $_GET['code']
$output = curl_exec($ch);
$oauth = json_decode($output, true);
// $oauth['access_token'] is user's oauth token
is what works for me
It’s curious i have no value in oauth I don’t understand what is your php version ?
Curious i’m with php 7.0.26 I have no result… Do you have an alternative code with php ?
On execution, the value $oauth = null if i print or var_dump it
Solution find ! Thank you for your help I’m just too tired I think xP I have forget to define the right redirect_uri x)
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.