Also removed your access/refresh tokens, they are passwords and should be treated as such
Thanks, I already edited my post.
You did json decode the response in 2 to correctly pass to 4?
Actually I do not have do any json decode, that response I get it directly when I var_dump this $content from this following code :
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $endpoint);
curl_setopt($ch, CURLOPT_POST, true);
$contents = curl_exec($ch);
curl_close($ch);
Then I stop this process once I got that access token.
After that I manually make another new request to call video endpoint using this access token as what I mentioned at number 4 then I getting this error : {“error”:“Unauthorized”,“status”:401,“message”:“Invalid OAuth token”.
Is it I can’t call it this way separately?
By the way, what I trying to do is, I would like to get this specific video info (Twitch) like video title/description/thumbnail because I can’t get this video real info when I view this video page source.
All the video meta data and Opengraph data will show the same e.g.
<title >Twitch</title>
< meta property='og:site_name' content='Twitch'>
< meta property='fb:app_id' content='161273083968709'>
< meta property='twitter:site' content='@twitch'>
< meta name='title' content='Twitch'>
< meta property='og:title' content='Twitch'><meta property='og:description' content='Twitch is the world's leading video platform and community for gamers.'>
< meta property='og:image' content='https://static-cdn.jtvnw.net/ttv-static-metadata/twitch_logo3.jpg'>< meta property='og:url' content='https://www.twitch.tv/videos/642942113'>
< meta property='og:type' content='website'>
Do you have any ideas for this so when the user share this link on the social network, the system should able to retrieve all these video info (title/description/thumbnail) so it can able to populate the correct video title/description/thumbnail on the site.
By the way, thanks for your response ![]()