Issue with Mismatched Grant ID in Webhook 'message.created' Notification

Dear Support Team,

I am experiencing an issue with the Nylas API where the grant_id received in the 'message.created' webhook notification does not match the grant_id obtained during the initial account configuration. Below is the detailed scenario:

Account Configuration:

  1. Configure a Gmail or Microsoft account using the Nylas API.
  2. After a successful authentication callback, store the grant_id received in the response for future comparison.

Webhook Notification:

  1. Trigger a 'message.created' webhook notification.
  2. In the callback, the webhook data includes a grant_id.
  3. Compare this grant_id with the one obtained from the original authentication.

The grant_id received in the webhook notification does not match the one from the authentication callback, which is causing issues in our system. Ideally, both IDs should match, but the discrepancy is leading to inconsistencies.

Steps to Reproduce the Issue:

  1. Configure a Gmail or Microsoft account using the Nylas API.
  2. Store the grant_id from the successful authentication callback.
  3. Trigger a 'message.created' webhook event.
  4. Compare the grant_id from the webhook callback with the one from the authentication.

This seems to be an issue with the Nylas API, as the mismatched grant_id values are creating challenges for us. Could you please investigate and provide a resolution at your earliest convenience?

Let me know if you need any further information.

Thank you for your prompt attention to this matter.

Best regards,
Emmad Altaf