Skip to main content
Solved

OAuth integration refresh token being revoked

  • June 27, 2024
  • 1 reply
  • 149 views

Forum|alt.badge.img+2

I am a developer setting up a Klaviyo integration with our web app. Each time I create a new integration the access token and refresh token work for a day and then the refresh token gets revoked remotely. We are still in development stage and this is not accessable to customers. We do run some unit tests for accessing the API through our code with the OAuth token. I have noticed that our unit tests occasionally hit rate_limit_exceeded exceptions on the refresh token and also invalid_grant with the message “Refresh token has been revoked”

My question is, what could cause our refresh tokens to be revoked? It is not coming from us or a customer, and it hasn't been inactive for 90 days. Any help is appreciated. Thanks

Best answer by Maxbuzz

Hello @audiencepoint 

The documentation says 

This is likely the only reason you will be getting an “invalid_grant” in production. This will occur for one of two reasons:

1. The customer uninstalled your app in Klaviyo.
2. Your app made a request to /oauth/revoke resulting in the app being revoked. This was likely because the customer uninstalled the app on your end.


I would check for any other test running in parallel  that can revoke the token.

Reference link: https://developers.klaviyo.com/en/docs/set_up_oauth#:~:text=%22error_description%22%3A%20%22Refresh%20token%20has%20been%20revoked%22

View original
Did this topic or the replies in the thread help you find an answer to your question?

1 reply

Forum|alt.badge.img+31
  • Partner
  • 252 replies
  • Answer
  • June 27, 2024

Hello @audiencepoint 

The documentation says 

This is likely the only reason you will be getting an “invalid_grant” in production. This will occur for one of two reasons:

1. The customer uninstalled your app in Klaviyo.
2. Your app made a request to /oauth/revoke resulting in the app being revoked. This was likely because the customer uninstalled the app on your end.


I would check for any other test running in parallel  that can revoke the token.

Reference link: https://developers.klaviyo.com/en/docs/set_up_oauth#:~:text=%22error_description%22%3A%20%22Refresh%20token%20has%20been%20revoked%22


Reply