PHP-OAuth2 icon indicating copy to clipboard operation
PHP-OAuth2 copied to clipboard

Simple Request

Open kojoduncan opened this issue 8 years ago • 1 comments

Hello

Can anyone please share the syntax for using the fetch call with a bearer token?

Thanks

kojoduncan avatar Aug 15 '16 20:08 kojoduncan

    $access=$_GET['token'];
    $client->setAccessToken($access);
 
        $info = $client->fetch('https://example.com/your-protected-page',
      array(),
          'GET',
          array('Authorization' => 'Bearer '. $access)
        );

produktive avatar Feb 19 '17 20:02 produktive