Skip to main content
Best answer

Oauth2 Access Token Expiring Instantly


Hello,

 

I have an issue with an integration I’ve created recently.

I first used a public client to authenticate/authorise and it worked without any issues.

I have changed that to a confidential client, and now I’m having issues with the access token.

 

I used Zapier CLI to create this, and after I successfully connect the account, after 3-4 seconds I get this message: “This account is expired.Please reconnect it here.”

Everything else seems to be fine, the client_id and client_secret should be ok, since I don’t get any errors when authenticating, but the token expires way too soon and I don’t understand why.

If I’m reproducing the actual flow to get the token using the same client, on Postman for example, I get a lifespan that has nothing to do with 3-4 seconds, so the configurations on my auth server can’t be the problem.


Thank you in advance!

Best answer by ikbelkirasan

Hi @clarrow - Receiving This account is expired.Please reconnect it here message instantly means that there’s something wrong with your OAuth2 test function. Try to check the Monitoring section to find out what’s going wrong.

View original
Did this topic help you find an answer to your question?
This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

4 replies

  • Author
  • Beginner
  • 2 replies
  • April 23, 2021

Just realised I’ve posted in General Questions, can someone move it to Developer forum please? Thanks!


ikbelkirasan
Forum|alt.badge.img+12
  • Zapier Expert
  • 555 replies
  • Answer
  • April 24, 2021

Hi @clarrow - Receiving This account is expired.Please reconnect it here message instantly means that there’s something wrong with your OAuth2 test function. Try to check the Monitoring section to find out what’s going wrong.


Mercology
Forum|alt.badge.img+5
  • Zapier Expert
  • 65 replies
  • April 26, 2021

What is the App you are trying to OAuth to?

I run into this when the OAuth requires some additional parameters to provide the refresh_token.  Things  like offline, or consent, etc.  I have also run across instances where the client/secret must be included in the token/refresh as a Basic username:password in base 64.  

 

 


  • Author
  • Beginner
  • 2 replies
  • April 27, 2021

Thanks for the answer, indeed the test endpoint was failing due to server restrictions using this client for the test api endpoint.