Lets say I have a webhook (server-side code) that gets called in response to an event. In this webhook I now want to call the Monday API and perform some operation e.g., reading/writing to a board. How do I authenticate my request? Reading Choosing an authentication method it seems the only way is to use Method 2: Using OAuth to issue access tokens. however when i tried to implement this there are some issues i ran into which raise some doubts.
- First, i will need to store the oauth token on the backend. it can be done but i have never seen such pattern before where an app stores a user’s tokens in a database. The link does say:
If your app needs to store a user’s API token or make API calls in the background, OAuth is a good option.
-
Second, within an account there can be thousands of users (taking worst case). Storing thousands of tokens raises some red flags in my mind.
-
Above point is maybe explained by following:
https://support.monday.com/hc/en-us/articles/360014664060-The-monday-apps-marketplace
Note: Installing apps can only be done by an admin of the account.
So when an admin installs an app, does it automatically become available to all users under that account? And I only need to store the admin’s OAuth token? that would explain it.
what are the best practices here? is OAuath the right approach or are there alternatives? thanks.