Skip to content
This repository has been archived by the owner on Dec 16, 2021. It is now read-only.

Cannot retrieve token information; Returning code 400 #124

Open
paxcodes opened this issue Jan 29, 2016 · 0 comments
Open

Cannot retrieve token information; Returning code 400 #124

paxcodes opened this issue Jan 29, 2016 · 0 comments

Comments

@paxcodes
Copy link

I'm trying to get token information through this endpoint:
https://developer.constantcontact.com/docs/authentication/access-token-info.html

I see the \Ctct\Auth\CtctOAuth2 class and so I instantiated that and called getTokenInfo();

However, it is returning an exception with code 400 and the errors: Bad Request and invalid_token. I know the token is valid because I have been using it in the API Tester at https://constantcontact.mashery.com and I am also able to use it in other endpoints like grabbing the account's contact lists.

I'm thinking this could be a problem with this php-sdk instead of the API itself since it is returning code 400 which is not a documented error. There could be a problem with how the request is made?

Here is my actual code:

  $oauth = new \Ctct\Auth\CtctOAuth2($api_key, $client_secret, '');

  try {
    $token_info = $oauth->getTokenInfo($access_token);
  } catch (\Ctct\Exceptions\OAuth2Exception $e) {
    log($e);
  }
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant