Authentication — 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 only requires a username and password, 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 works the same as Basic auth but includes a customizable form where you can request additional authentication data from users.

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.

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 after your app’s full name
  • The username that users enter in the Zapier authentication form when adding your app—enter {{bundle.authData.username}} to include that
  • Output fields from your app’s authentication test API call, referenced with {{bundle.inputData.field}} variables, replacing field for your API output field name.

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.

Have any feedback or questions? Let us know.