Is there any method by which we can check if the access token we have currently is valid or not .. For example if I get a accesstoken 12345 today and got it stored in database, but for tomorrow I need to get the new accesstoken. So I need to first check if the current access token is valid or not..
The current method to setaccesstoken i.e $kite->setAccessToken($accesstoken) gives a true response even if we pass the incorrect access token.
Basically what I want to do is tht I want to check if the accesstoken has expired and if yes than redirect to the loginurl to run the login process..
But than I tried catching the exception instead of error.. and it solved the issue..