Grant/me/calendar throwing 401 Unauthorised

Currently I am facing quite a few roadblocks while upgrading Nylas from V2 to V3. Here is one of them:

So I am implementing V3 Schedule Editor in our application. The main goal is to use custom auth. We already have the access token stored in our database, hence use it. The steps I am following to achieve this are to trial the flow using the sample applications provided by you guys on Github. Here is the link: Github.

What I can see is, it is calling [https://api.us.nylas.com/v3/grants/me/calendars](https://api.us.nylas.com/v3/grants/me/calendars) API to get the calendar details of the user using the Access Token as the Authorization Bearer Token. I have tried hitting this API using Postman and it is working fine. I am getting the expected response but when the sample React application is calling, I am getting 401 Unauthorized

I haven’t changed the existing code at all other than adding some console logs to debug and have added mode: 'no-cors' in the fetch call as initially it was throwing CROS error.
Any help on this issue will be highly helpful.

1 Like