phpkiteconnect icon indicating copy to clipboard operation
phpkiteconnect copied to clipboard

How to detect when access token has expired?

Open Whip opened this issue 6 years ago • 1 comments

I want to send an email when the access token expires. I see there's a method in kiteconnect.php setSessionExpiryHook but I'm not sure how to use that. Can you post an example?

Whip avatar Nov 14 '19 05:11 Whip

Too late to answer, but it expires every morning. Alternatively, you can just send get profile request every 5 minutes. If it fails, it means the token is expired.

VarunAgw avatar Jul 14 '20 14:07 VarunAgw