Hi, I hope I am in the right forum.
Actually I make a call to the endpoint like that :
$token = base64_encode(urlencode($twitter_clientid) . ':' . urlencode($twitter_secret));
$client = new \GuzzleHttp\Client();
$response = $client->post('https://api.twitter.com/oauth2/token', [
'headers' => [
'Authorization' => 'Basic ' . $token,
'Accept' => 'application/json'
],
'form_params' => [
'grant_type' => 'client_credentials'
]
]);
$result = json_decode($response->getBody()->getContents());
$bearerToken = $result->access_token;
var_dump($bearerToken); // return a token here
I can get a valid Bearer Token. Now what to do ? How do I go troughs the Single Login process (if its possible at all) ? I can’t find anything in the doc.
My goal is to retrieve user information, like nickname or the email address.
Any help/example appreciated, thanks you all.