User Authentication for Your Integration
Execute actions as the actual user, not as a bot. Messages, emails, and invites sent from real accounts, indistinguishable from manual actions.
What is Auth on Behalf?
With Auth on Behalf, users explicitly grant your application permission to act on their connected accounts. Through a secure redirect flow, they authenticate directly with the provider, your app never touches their credentials. Once authorized, you receive a simple account_id to execute any action within their granted scope.
One Link, All Auth Methods Handled
Skip the complexity of building OAuth flows, QR code scanners, session handlers, 2FA verification, and captcha management. Generate a single link—Unipile handles everything.
Pre-built UI
Production-ready auth wizard with responsive design
Redirect URLs
Configure success & failure callbacks for seamless UX
Webhooks
Instant notifications with account_id mapping
White-Label
Custom domain support (auth.yourapp.com)
Implementation in 4 Steps
From generating an auth link to executing API calls on behalf of your users
const response = await fetch( "https://api.unipile.com/api/v1/hosted/accounts/link", { method: "POST", headers: { "X-API-KEY": "YOUR_API_KEY", "Content-Type": "application/json" }, body: JSON.stringify({ type: "create", providers: ["LINKEDIN", "GOOGLE"], notify_url: "https://yourapp.com/callback", name: "user_123" }) } );
// Response from Unipile API { "object": "HostedAuthURL", "url": "https://account.unipile.com/pqb..." } // Redirect user to this URL window.location.href = response.url;
// Payload received on your notify_url { "status": "CREATION_SUCCESS", "account_id": "e54m8LR22bA7G5qsAc8w", "name": "user_123" } // Store the account_id mapping await saveUserAccount( payload.name, payload.account_id );
// Send message on behalf of user const message = await fetch( "https://api.unipile.com/api/v1/chats", { method: "POST", headers: { "X-API-KEY": "YOUR_API_KEY", "Content-Type": "application/json" }, body: JSON.stringify({ account_id: "e54m8LR22bA7G5qsAc8w", text: "Hello from your app!" }) } );
Build It Yourself vs Unipile Hosted Auth
Connecting users to multiple providers requires handling OAuth, QR codes, sessions, 2FA, and more. See what you skip with Unipile.
Security Architecture
Enterprise-grade protection by design
Session Isolation
Each account connection is isolated and sandboxed. No cross-contamination between user sessions.
Token Abstraction
Authorization tokens are managed server-side by Unipile. You only interact with a simple account_id.
Webhook Verification
Secure callbacks with optional authentication parameters to verify request authenticity.
Automatic Reconnection Handling
Handle disconnections gracefully with automated workflows. When a user's session expires or credentials become invalid, Unipile notifies you instantly so you can trigger a seamless reconnection flow.
CREDENTIALS status
type: "reconnect"
Supported Providers
Full Auth on Behalf support across all integrations
Start Building with Auth on Behalf
Integrate in 2 days with comprehensive documentation and dedicated support. Connect your users' accounts securely.
Accounts
Built-In Security and Compliance
Enterprise-grade protection for your data and workflows Learn more about our security
Auth on Behalf FAQ
Common questions about user authentication and the Hosted Auth flow
account_id returned after successful authentication. This eliminates security risks associated with credential storage.
notify_url, 4) Store the account_id mapping and start making API calls. Most teams complete integration in 1-2 days.
status: "CREDENTIALS". You can then notify the user and generate a reconnection link using type: "reconnect". The flow is identical to initial authentication—seamless for both you and your users.
auth.yourapp.com) instead of Unipile's default URL. Simply configure a CNAME record pointing to account.unipile.com and contact our support to finalize the setup.
Still have questions about Auth on Behalf?
View Documentation
Instagram