Skip to main content

How to set up an OAuth Connection for Custom Actions

Set up an OAuth Connection once, then reuse it as an authentication method across any Custom Action.

Written by Alfredo Salkeld

OAuth Connections let your receptionist authenticate with apps that use OAuth (like HubSpot, Salesforce, or any provider with an OAuth flow) without you having to manually refresh tokens. Set up the connection once, then reuse it across any Custom Action.

If the app you want to connect to uses a static API key, skip this article. Pick Bearer token when configuring your Custom Action instead.

How to set up an OAuth Connection

1. Open the OAuth Connections tab

Go to Agent > Custom actions, then switch from the Webhooks tab to the OAuth Connections tab.

2. Copy the Callback URL

Near the top of the page you'll see a Callback URL. Copy it. You'll paste this into your OAuth app's settings as the redirect URI (sometimes called the callback URL) when you create the app on the provider's side.

3. Add a new connection

Click Add connection and fill out the fields:

  • Connection name: something memorable, like HubSpot Sales account. Just for your reference.

  • Provider name: the name of the service (e.g., HubSpot, Salesforce).

  • Client ID: from the OAuth app you created on the provider's side.

  • Client secret: also from your OAuth app.

  • Authorization URL: the HTTPS URL where users grant access. From the provider's developer docs.

  • Token URL: the HTTPS URL where the backend exchanges the auth code for tokens. Also from the provider's docs.

  • Token Auth Method: choose Client secret basic or Client secret post. The provider's docs will say which one to use.

  • Scopes (if needed): space or comma separated, copied straight from the provider's docs. Only request the scopes you actually need.

4. Save and authorize

Save the connection. You'll be redirected to the provider to authorize access, then sent back to Upfirst once it's done.

Using your OAuth Connection in a Custom Action

Once the connection is saved, it appears as an authentication option when you set up a Custom Action. In the request configuration step, choose OAuth, then select the connection you just created.

Things to know

  • You can create multiple OAuth Connections, one per provider or one per account at the same provider.

  • Tokens refresh automatically as long as the provider supports refresh tokens. You don't need to manually re-authenticate.

  • The Callback URL is the same for every connection. Paste it into the provider's Redirect URI or Callback URL setting when you create the OAuth app.

  • If you're not sure what to put in any field, check the provider's developer docs for "OAuth 2.0" or "authorization code flow." Every provider documents these endpoints.

Did this answer your question?