Nylas Hosted Authentication Not Working

I have followed the documentation to the T and created a Google GCP external account with the required permissions. I have also created a connector on my nylas dashboard for google using my google client id and secrete plus google pub/sub project id.


I am trying to authenticate users using the nylas hosted authentication urlForOAuth2 method. I am able to detect the provider successfully using the auth.detectProvider and the url has been generated successfully but then I get an error indicating the request is not allowed. I don’t know what I am doing wrong but I believe I don’t have to verify my app for this to work with hosted authentication?


Hello @backgroundbuddy

Have you gone to the Hosted Authentication tab on the V3 Dashboard? After that you need to go to Callback URIs and add your URL like this…

Thanks @Blag that was the key but even with hosted authentication, google is still warning my app is not verified, is that the normal behaviour?

Also I am unsure which of the events for messages will be triggered when the user receives a new message in my app? I checked the events for messages and couldn’t find that


Can you please let me know which one can help in my case?

Also please let me know how I can fetch the next bulk of messages if I want to fetch them in batches. I can see a nextCursor attribute, but I don’t know how that works.

@backgroundbuddy That would be message.created :slight_smile:

Regarding app is not verified that is normal if you’re on a Sandbox environment…if you want your app to be verified you would need to talk with support and/or sales.

1 Like

@backgroundbuddy To use nextCursor you can call the messages endpoint Nylas v3 Email, Calendar, and Contacts API docs | Nylas Docs and pass it to this parameter:

That’s a lot @Blag, that’s absolutely helpful.

1 Like

Hey @Blag I also mentioned the webhook event to receive a new message from a user. please can you help with that. :pray:

I am also having similar issues with my Nylas integration where it says app is not verified, do I need to request verification of the scope through GCP or Nylas handles all that?
My Nylas is a Paid account by the way

Hey @Paschal,

Thanks for reaching out! The issue you’re seeing is likely due to Google’s restrictions on unverified applications.

You’ll need to verify your Google Cloud Platform (GCP) project directly with Google — not Nylas. This involves completing their OAuth verification process (and possibly a security assessment if you’re using restricted scopes like gmail.readonly or gmail.modify).

If you’d prefer not to go through verification, Nylas also offers a Shared Verified Google Cloud Project available on certain plans. Let us know if you’d like to explore this option, and we can loop in our Sales team.

Please note that Google’s verification can take a few weeks, so it’s good to plan ahead. For details, you can review Google’s App Verification Guide

I hope this helps, please let us know if you have any questions