Q: How to user shared account for authentication

I’m building a pack that allows users to send emails using SendGrid, which requires an API key. Following the instructions, I’ve used pack.setUserAuthentication and everything works perfectly.

The problem is that it seems like my function is looking for the user’s private account, whereas I want to have the DocMaker set a shared API keys that all users can use to take actions.

In the settings. Coda lets the user specificly set the shared account credentials, as I have them set in the following image.

But when adding the formula for the doc its still asking the user to set the private account.

What am I missing? How do I get the formula to use the shared account?

A few more clarifications:

  1. The intention is that each “organization” create their own API key with SendGrid
  2. There’s no point in api key created per user, it makes sense for all users shared on the doc to use the same API key (seems like this is exactly the use case described in the shared account section of the settings)
  3. When logged in with a different user, that user sees that a shared account exists, but they can’t select it as their private account
  4. I’ve tried using pack.setSystemAuthentication just to cover all the basis. The completely removes API key settings from the end user - so doesn’t not fit my use case.

Hi @Ron_Srebro1 - Is this an action formula you are referring to? If so, the default for a button is the user’s private account:

image

But if you change the toggle to “Shared” then it will prompt you to select a shared account to use for that button for all users of the doc:

image

Let me know if I misunderstood the problem.

Thank @Eric_Koleda!

This is the answer to my question “what am I missing”

I kept looking for this on the pack side and not on the document end.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.