Email Connector Oauth authentication

0
We are using the Email Connector module with OAuth authentication in our Mendix application. Recently, we’ve been encountering a recurring issue that’s affecting the performance of the application. After some time of usage, we frequently see the following error, which seems to occur during the OAuth token renewal process:   Is there a known issue or patch for this in the Email Connector module? Any suggestions on how to gracefully handle token failures to avoid high memory usage? Any guidance, suggestions, or workarounds to address this issue would be greatly appreciated.   Thanks in advance!
asked
1 answers
0

Hi Kayal,

This error usually indicates that the token request is invalid. Common reasons for this issue:

  • The refresh token is expired, revoked, or invalid

  • Client ID or Secret mismatch

  • Issues in the token endpoint or headers (like missing Content-Type)

  • The token endpoint not supporting refresh with the same auth code

You can try the following:

  • Double-check your Client ID, Client Secret, Redirect URI, and Scope values to ensure they're consistent.

  • Enable REST logging and check the response body of the 400 error, it often contains useful details (e.g., if the token is expired or invalid).

  • Make sure you're using the latest version of the Email Connector module from the Mendix Marketplace.

To avoid high memory usage:

  • Avoid calling token refresh in a tight loop.

  • Use a Scheduled Event to refresh the token every 30–45 minutes instead of refreshing during peak usage.

 

Thanks

Guna 

answered