I am getting message.opened webhook updates even after grant has expired long ago.
The grant expired 10 days ago but I am still getting message.opened webhook notifications which is causing an error in my end because the grant is invalid.
Errors such as: Error creating grant with provided OAuth params; provider details: {“oauth2”:“"invalid_grant" "Token has been expired or revoked."”}
or
Error: Unauthorized at APIClient.sendRequest
During the first 3 days of token expiration the error I was getting was
“Error: Unauthorized at APIClient.sendRequest” which might be normal because of Nylas’ 72 hours rule Changes to webhooks in Nylas v3 | Docs
But can someone please explain why am I getting a message.opened webhook and “Errors such as: Error creating grant with provided OAuth params; provider details: {“oauth2”:”"invalid_grant" "Token has been expired or revoked.""}: after 7 days since token has expired?
Shouldn’t Nylas stop sending these webhooks by now?
@daginegussu thanks for posting - just to clarify, for the webhook events, is it just message.opened or other webhooks associated with a grantId?
Taking a look at how message opened works, this will be possible if a grant expires, specifically for message.opened since its not linked to a grantId, but message sent. This may need to be filtered on receiving events from Nylas, given these events are not tied to a grantId.
thanks @ram
I am just receiving message.opened even after the grant has expired. But events like thread.replied aren’t being sent to me if the grant has expired; they only work if the grant is active. But it seems like message.opened will be sent to my webhook endpoint regardless of the grant’s validity.
What I was expecting was, to only get event notifications if the grant hasn’t expired or been revoked.
So just to close the thread, is it normal to get message.opened even after the grant has expired