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.
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
To add Basic Auth to your Zapier integration, open the Authentication tab in Zapier visual builder and select Basic Auth.
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
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.
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
stringtext field for all input fields by default; select
passwordinstead 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.
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
/user to simply check the app authentication and retrieve details about the user.
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.
Configure a 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
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.