Title: Problem Getting Access Token
Last modified: August 20, 2016

---

# Problem Getting Access Token

 *  [Chad Killingsworth](https://wordpress.org/support/users/chad-killingsworth/)
 * (@chad-killingsworth)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/problem-getting-access-token/)
 * I spent half my day debugging this. Turns out, the plugin is signing the request
   for an access token with both a token and a token secret – but at this stage 
   of the OAuth flow, there is no token secret.
 * I was able to work around the issue by updating the fetch_access_token function
   in the class-oauth.php file to the following:
 *     ```
       public function fetch_access_token(&$request) {
           $this->get_version($request);
   
           $consumer = $this->get_consumer($request);
   
           // requires authorized request token
           $token = $this->get_token($request, $consumer, "request");
           $token->secret = ""; //Clear out the secret - there is none at this point
   
           $this->check_signature($request, $consumer, $token);
   
           // Rev A change
           $verifier = $request->get_parameter('oauth_verifier');
           $new_token = $this->data_store->new_access_token($token, $consumer, $verifier);
   
           return $new_token;
         }
       ```
   
 * [http://wordpress.org/extend/plugins/oauth-provider/](http://wordpress.org/extend/plugins/oauth-provider/)

The topic ‘Problem Getting Access Token’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/oauth-provider.svg)
 * [OAuth Provider](https://wordpress.org/plugins/oauth-provider/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/oauth-provider/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/oauth-provider/)
 * [Active Topics](https://wordpress.org/support/plugin/oauth-provider/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/oauth-provider/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/oauth-provider/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [Chad Killingsworth](https://wordpress.org/support/users/chad-killingsworth/)
 * Last activity: [13 years, 1 month ago](https://wordpress.org/support/topic/problem-getting-access-token/)
 * Status: not resolved