PHP-OAuth2
PHP-OAuth2 copied to clipboard
Simple Request
Hello
Can anyone please share the syntax for using the fetch call with a bearer token?
Thanks
$access=$_GET['token'];
$client->setAccessToken($access);
$info = $client->fetch('https://example.com/your-protected-page',
array(),
'GET',
array('Authorization' => 'Bearer '. $access)
);