How should oauth work in workdocs?

I’m building a workdoc feature and would like to hit the Monday API from my backend. How do you recommend I get the monday access token to perform this API request?

Currently, I created a Sign In button inside the window that is shown when doing a slash command in the workdoc. Once a user clicks the button, it triggers the OAuth popup, which lets the user authorize the app. Then it automatically closes the OAuth popup and refreshes the original window that was opened via the slash command.

Is this the best way of handling getting an API access token from the workdocs context or is there a better way?

Hello @PluginGenie,

Your approach sounds good!

You might want to take a look into this