zend framework2 - Correct Way to use returned ApiGility Implicit Token -


my app receives access token virtue of implicit grant. attempting use token access content servers rpc service. not 100% sure if correct way unable work.

 $code = (string) $this->params()->fromquery('code', null);      $client = new httpclient(         'http://www.example.com/api/books',         array(             'maxredirects' => 0,             'timeout' => 30         )     );      $client->setmethod('get');      $client->setheaders(         [             'accept' => 'application/json',             'authorization' => 'bearer '.$code         ]     );      try {         $response = $client->send();     } catch (\exception $e) {        throw new \exception($e);      } 

here example in postman failing:

enter image description here

in question authorization_code used , not access_token , that's why failed.


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -

How to provide Authorization & Authentication using Asp.net, C#? -