Regarding auth flow of email and scheduler

Hey @ram . Is there any other way to do this without exposing API Key in headers of FE request? Can anyone give a code example on how to do it?

All the code examples Nylas has in their docs are just mentioning sending access token but everytime I try to send the access token on my custom identity wrapper class, the request to /calenders endpoint just throws a CORs.

There are alot of tokens here:
id token, access token, refresh token, client id, api key, grant id.

Can anyone just provide an example mentioning which one to use where? I’ve tried all sorts of different combinations and the only one that works is the one with API key sent in header but that is super insecure and can lead to serious problems.

@dhruv have you done anything about keeping api key safe?
We also have this thread with relevant discussion.

@hamzasymbo make a function inside custom wrapper which will call your backend internal api and from where you can call to the nylas api request format with API_KEY which is currently in customwrapper and get the response to the client side from your backend api and don’t forget to put it in the .env this how it could work