Add authentication with Basic Auth

Basic Authentication lets you connect APIs to Zapier that authenticate users with a username and password. In a Zapier integration with Basic Auth, Zapier includes the name and password of the user in the API request bundle every time Zapier polls an API endpoint for new data or posts new data to an API endpoint.

Zapier basic auth for users Example Basic Auth screen for users inside Zapier

When you add Basic Auth to your integration, Zapier adds a pre-built form that requests a username and password whenever users authenticate with your API. Zapier then makes a test call to verify the credentials, and stores them to use with every subsequent API call Zapier makes to your app on behalf of the user.

When to use Basic Auth: Use Basic Auth if your API requires a username and password or other basic fields, needs no special configuration, and specifically if your API leverages “HTTP Basic Authentication”. If you need further customization of your login flow or need additional data from users, API key authentication may be what your API requires.

How to Add Basic Auth to a Zapier Integration

Add Basic Auth to Zapier integration

To add Basic Auth to your Zapier integration, open the Authentication tab in Zapier visual builder and select Basic Auth.

Basic Auth settings

Zapier automatically adds a form where users will enter their username and password, so you don’t need to configure anything for core basic auth.

All you need to add is a test API call where Zapier can verify that the credentials work, and optionally a connection label to help users identify the account.

Add More Fields to a Basic Auth Input Form

Add fields to Basic Auth Zapier

In addition to the username and password on the pre-built form, you can add more fields if your API documentation requires it.

For each field that you need, click the Add Fields button and fill in the details for your field.

Zapier Basic Auth Input Form

Every input field requires a Key, the name your API uses to reference this field. Enter the same key name that your API uses.

Then fill in the optional fields, as appropriate, especially the Label:

  • Label: A human-friendly name for this field. Enter what this value is called inside your app’s UI.
  • Is this field required: Check this box for your field, and for any other fields that your API requires for authentication.
  • Type: Zapier uses the string text field for all input fields by default; select password instead if you would like to obscure the data as users enter it.
  • Help Text: Include details to assist users in authenticating with your app, especially if they may be unsure where to find the data needed. Format text with Markdown, and include a link if needed.
  • Default Value: Include a value for this field to be used as a fallback. For optional fields, the default value is set on initial creation and used instead of missing or null values every time the Zap runs. For required fields, this value is used during Zap creation, but not when the Zap runs (Zapier raises an error for missing/null values instead).
  • Static Dropdown: Include values to offer users pre-set options to choose from. Learn more.

Note: The input field designer also includes an option for computed fields; those are not applicable to Basic Auth login and are only used with OAuth v2 and Session auth.

Once you’ve added your input fields, Zapier lists each input field with its label, key, type, and required status on your authentication settings. Click the field to edit it, or click the gear icon and select Delete to remove a field.

Edit Basic Auth input fields

When you’ve added the needed fields, click Continue to Configure a Test Request & Connection Label and continue setting up your app’s authentication.

Configure a Test Request

For the test API call, enter an API endpoint under the Test header where Zapier can test users’ credentials for your app, and set the correct call method (typically GET). Use an API endpoint that does not require any additional details or configuration, such as /me or /user to simply check the app authentication and retrieve details about the user.

Basic Auth configuration in Zapier

If your API requires any custom details in the API call, click the Show Options link in the lower right, then add URL params or HTTP headers if needed.

Zapier Basic Auth code mode

If you need more customization, you can write custom JavaScript code to call your API and parse the output data. To do that, click the Switch to Code Mode toggle. The first time you click the toggle, Zapier will convert the data from your API call form to JavaScript. If you switch back to form mode, Zapier will save your custom code but will not use it in the API call. Additionally, if you switch back to code mode again later, Zapier will not add any changes from the API call form to your code.

Configure a Connection Label

Zapier Basic Auth connection label

Finally, add a connection label to your Zapier integration. Zapier always includes the app’s name in each account label. You can additionally include:

  • Plain text that will be included in every account connection
  • Any information that users enter in the Zapier authentication form when adding your app, such as the username
  • Output fields from your app’s authentication test API call

Fields can be referenced using double curly braces. For example, the username field would look like {{username}}.

Learn more in our Connection Label documentation.

Click Save & Continue when finished to save your authentication settings.

Then, test your authentication, adding a real account to ensure Zapier can successfully connect to your app and use your test API call. Check our Authentication Testing docs for more details, common errors you may encounter, and how to resolve those.


Need help? Tell us about your problem and we’ll connect you with the right resource or contact support.