Authentication overview
Zapier Platform provides mechanisms to authenticate and authorize connections between various applications, ensuring that automated workflows (Zaps) operate securely and with appropriate permissions. The platform's authentication framework is critical for developers building new app integrations and for users configuring Zaps. It allows services to exchange data under defined scopes without exposing sensitive user credentials directly to third-party applications or to Zapier itself in certain contexts.
For app developers building on the Zapier Developer Platform, authentication methods are integrated into the app definition process, determining how end-users will connect their accounts. For end-users, Zapier manages the secure storage and use of credentials once an account is authorized, abstracting the underlying authentication flow.
Supported authentication methods
Zapier Platform supports several authentication methods tailored to different integration scenarios, prioritizing security and user experience. The choice of method often depends on whether you are building a new application integration for the Zapier ecosystem or using Zapier's built-in tools for custom automation.
OAuth 2.0
OAuth 2.0 is the recommended and most widely used authentication method for connecting user accounts to Zapier. It is an authorization framework that enables applications (clients) to obtain limited access to user accounts on an HTTP service (resource server), without exposing the user's long-term credentials to the client. Instead, the client obtains an access token, which is a short-lived credential used to access protected resources. This process often involves a user consenting to specific permissions requested by the application. The OAuth 2.0 specification is maintained by the IETF.
- When to use: Ideal for public and private integrations where users connect their accounts to Zapier. This includes most third-party applications integrated into Zapier, as it allows users to grant specific permissions without sharing their username and password directly.
- Security level: High, as it uses token-based authorization, supports refresh tokens for continuous access without re-authentication, and limits access via scopes.
API Key Authentication
API key authentication involves a unique alphanumeric string (the API key) that identifies and authenticates the user or application making a request. This key is typically sent in the request header or as a query parameter. While simpler to implement than OAuth 2.0, API keys grant broad access and require careful management to prevent unauthorized use.
- When to use: Suitable for internal integrations, custom code steps within Zaps, or when integrating with services that only offer API key authentication. Developers building private app integrations for Zapier may use API keys if OAuth 2.0 is not feasible for the target service.
- Security level: Moderate to high, depending on how the keys are generated, stored, and transmitted. Requires strong security practices for key management.
Basic Authentication
Basic Authentication is a simple HTTP authentication scheme where credentials (username and password) are sent in the HTTP header, typically Base64 encoded. While easy to implement, it is considered less secure than token-based methods because the credentials are directly transmitted and easily decoded if not combined with HTTPS.
- When to use: Primarily for connecting to legacy systems or APIs that do not support modern authentication methods, often used within Zapier's Webhooks or Code steps for specific endpoints.
- Security level: Low to moderate. Requires HTTPS to prevent credentials from being intercepted in plain text.
Other Methods (e.g., Digest, Session, Custom)
Zapier's Developer Platform also allows for more custom authentication methods through its developer documentation on authentication. These can include variations of session-based authentication or custom header-based methods for specialized integrations, though OAuth 2.0 is generally preferred where available.
Here's a summary of the common authentication methods:
| Method | When to Use | Security Level |
|---|---|---|
| OAuth 2.0 | Connecting user accounts to third-party apps, public/private integrations | High (token-based, scoped access) |
| API Key | Internal integrations, custom code, services lacking OAuth 2.0 | Moderate to High (requires careful key management) |
| Basic Auth | Legacy systems, specific endpoints in Webhooks/Code steps | Low to Moderate (requires HTTPS) |
Getting your credentials
The process for obtaining credentials depends on whether you are an end-user connecting an application through Zapier or a developer building an integration for the Zapier Platform.
For End-Users (Connecting Apps in Zapier)
When you add an app connection within Zapier, the platform guides you through the necessary authentication flow. For OAuth 2.0 connections, you will typically be redirected to the service provider's website to log in and authorize Zapier. For API key or basic authentication, you will be prompted to enter the required credentials directly into Zapier.
- OAuth 2.0: Zapier facilitates the redirection to the service's authorization page. You log in directly with the third-party service and grant Zapier the requested permissions. Zapier then receives an access token.
- API Keys: You will generally need to generate an API key from the settings or developer section of the specific application you wish to connect. For example, Stripe API keys are generated in the Stripe Dashboard. You then paste this key into Zapier when prompted.
- Basic Auth: You enter your username and password for the target service directly into Zapier. Ensure this is only done over HTTPS connections.
For detailed steps on connecting specific apps, refer to the Zapier help documentation on app connections.
For Developers (Building on Zapier Platform)
Developers creating new app integrations for the Zapier Platform define the authentication method during the app creation process. This involves configuring the specific OAuth 2.0 endpoints, API key fields, or other custom authentication logic within the Zapier Developer Platform interface. These configurations dictate how end-users will authenticate when connecting your app.
- OAuth 2.0: You will need to register your application with the target service (e.g., Google, Salesforce, GitHub) to obtain Client ID and Client Secret. These credentials, along with the service's authorization and token endpoints, are then configured within the Zapier Developer Platform. For example, Google's OAuth 2.0 documentation provides guidance on setting up client credentials.
- API Key: If your custom integration requires an API key from a service, you define the input field for this key within your app's authentication settings on the Zapier Platform. Users will then provide their keys when connecting.
The Zapier Developer Platform's authentication docs provide comprehensive guides for implementing each method.
Authenticated request example
As Zapier Platform focuses on enabling integrations rather than direct API consumption by end-users for custom automation (which typically uses Zapier's Webhooks or Code steps), a direct curl example for Zapier's internal API is less relevant for most use cases. However, if you are building an app integration on the Zapier Platform and interacting with a third-party API, the authenticated request would look similar to this, assuming an API key is required and passed in a header:
curl -X GET \
'https://api.example.com/v1/resource' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json'
In this example, YOUR_API_KEY would be replaced by the actual API key obtained from the third-party service. For OAuth 2.0, the Authorization header would contain a bearer token obtained after the OAuth flow, as described in the OAuth 2.0 Bearer Token Usage specification.
When using Zapier's built-in Webhooks or Code steps to interact with an API, you would configure the authentication details directly within the Zap editor. For instance, in a Webhooks "Custom Request" action, you can specify authentication headers, query parameters, or basic auth credentials.
Security best practices
Adhering to security best practices is essential when handling authentication credentials on Zapier Platform, whether you are an end-user or a developer.
For End-Users:
- Grant Least Privilege: When connecting apps via OAuth 2.0, review the requested permissions carefully and ensure they align with the intended use of the Zap. Grant only the necessary scopes.
- Regularly Review Connections: Periodically check your connected accounts in Zapier to ensure all active connections are still needed and authorized. Remove any unused or suspicious connections.
- Secure API Keys: If using API keys, treat them like passwords. Do not share them publicly or embed them directly in client-side code. If an API key is compromised, revoke it immediately through the source application's settings and generate a new one.
- Use Strong, Unique Passwords: For any services connected via Basic Auth or if your Zapier account password is used for authentication to other services, ensure you use strong, unique passwords and enable multi-factor authentication (MFA) on those services where available.
For Developers (Building Integrations):
- Implement OAuth 2.0 Where Possible: Prioritize OAuth 2.0 for user authentication in your app integrations. It provides a more secure and user-friendly experience by allowing scoped access and avoiding direct credential handling.
- Securely Store Credentials: Never hardcode credentials in your integration code. If you must store API keys or client secrets, use secure environment variables or a secrets management service. Zapier itself manages the secure storage of user tokens for connected apps.
- Validate and Sanitize Inputs: Always validate and sanitize user inputs to prevent injection attacks and other vulnerabilities.
- Use HTTPS Everywhere: Ensure all communication with external APIs occurs over HTTPS to encrypt data in transit and protect against man-in-the-middle attacks. This is a fundamental principle of secure API communication, as detailed in the Cloudflare SSL/TLS overview.
- Follow Zapier's Developer Guidelines: Adhere to the security recommendations provided in the Zapier Developer Platform documentation, which cover best practices for building robust and secure integrations.
- Error Handling and Logging: Implement comprehensive error handling and logging to detect and respond to potential security incidents, but avoid logging sensitive authentication details.