Need authorization help using API v2 with Excel VBA

I’ve created an Excel workbook using VBA to update monday using API v2. Currently, I have my own API token as a constant in the VBA project. I want to be able to have other people use the workbook. Obviously, having my token as a constant is not optimal. The other possibility I see is to have the user paste their token into the sheet. I don’t like that they would either have to paste their token every time they opened the workbook or allow them to save it with the token.

My preference would be that the fact that they are logged in on monday would allow them access to the API.

Any ideas?

Hi @JCorrell, Jim

This is where OAuth comes in :slight_smile:. You make an HTTP request to where you specify a callback. The callback will be called by with a code. With this code you make another HTTP request to and you wait for a return from with a token. In this handshake you can define what your VBA project wants to do with the board (scope) and the user will be prompted to authorize this.

There’s a repository with a simple server to server example usage of the OAuth functionality in general:

See also an article here:

1 Like

Thanks for the help!