Thank you
So now I Try to get (name to id) but “Invalid OAuth token”
with that code : (I try to put in oauth secret, also i try to get it by this doc https://dev.twitch.tv/docs/authentication/getting-tokens-oauth):
<?php
header('Content-Type: application/json');
$videosApi = 'https://api.twitch.tv/helix/users?login=pokanoname&login=pokanoname';
$clientId = client'id';
$ch = curl_init();
curl_setopt_array($ch, array(
CURLOPT_HTTPHEADER => array(
"Accept: application/vnd.twitchtv.v5+json",
'Client-ID: ' . $clientId,
"Authorization: OAuth oauth_code"
),
CURLOPT_SSL_VERIFYPEER => false,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_URL => $videosApi
));
$response = curl_exec($ch);
curl_close($ch);
$json = json_decode($response, JSON_PRETTY_PRINT);
print_r($json);