Hello, currently I’m linking a google account using a https://oauth2.googleapis.com/token response. I already have the refreshToken from google and pass it to nylas v2 java sdk in order to get a Nylas AccessToken that i later use to link a calendar for that google account to a scheduler configuration that will check availability given it’s primary virtual calendar plus, the calendars linked to the google account/nylas token. How can i do this in v3? Can’t seem to find any straightforward answer to this. I actually asked this through a support ticket and they suggested for me to ask here, thanks.
There’s a lot wrapped up in your question, so let me try to hone in on where your problem is.
What I am getting is:
Your v2 app is using Native Authentication as you are supplying your own Google refresh tokens
You have provided working code to turn a Google refresh token into a Nylas access token in your v2 app
You want to know how to do the same thing in v3 - that is, get a Nylas token that you can then use to make other requests for this account
While you provided some high level info about what you are trying to do with that access token, you don’t provide any code for this - so I’m assuming where you’re getting stuck is getting an equivalent token in the first place
Please correct me if any of the above is incorrect.
Does this documentation help? If not, I can try to directly translate your v2 code snippet for you. But I don’t want to go through the setup for that if I’m not correct about where your problem lies.
Thanks @spang Yes, you’re totally right, I wasn’t sure if creating a nylas token to do the same thing I’m currently doing(just link the calendar to the scheduler config for availability) I think I was told that I could set the grantId as part of the availability calendars when creating the config and nylas would take care of this?
So going back to the current issue here, I tried the documentation you shared, and I’m getting a 400 error. I can share the details, maybe I’m missing something? Thanks again