Connection methods

Before you can handle chats and messages, you must connect an account of the wanted messaging provider. Discover Unipile's connection methods in this section.

Overview

Unipile's API provides two account connection methods, ensuring that you can seamlessly synchronize accounts for different messaging services. Connecting an account involve authentication to the messaging provider through Unipile's API.

Supported authentication features for Messaging

WhatsAppLinkedinInstagramMessengerTelegramTwitter
Hosted Authentification🟒🟒🟒🟒🟒🟒
Custom Authentification🟒🟒🟒🟒🟒🟒
QR Code scanning🟒🟒
Authentication with username / passwordπŸŸ’πŸŸ’πŸŸ’πŸ”΄πŸŸ’
2FA with SMS🟒🟒🟒
2FA with Authentication App🟒🟒🟒
2FA with In-App ValidationπŸŸ’πŸ”΄πŸ”΄
One-Time PasswordπŸŸ’πŸ”΄

Supported authentification features for Emails

GoogleMicrosoftIMAP
Hosted Authentification🟒🟒🟒
Custom Authentification🟠🟠🟒
Authentification with OAuth Provider Screen🟒🟒
Authentication with username / password🟒🟒

Hosted auth wizard

Hosted Auth Wizard is the quickest and most straightforward way to connect accounts, as it involves a single API call to generate an temporary link to redirect users to a Unipile's Hosted auth wizard. The wizard guides users step-by-step, supporting various authentication methods.

Hosted auth wizard for Linkedin

Hosted auth wizard for Linkedin

Custom authentication

If you want to embed a custom authentication form/wizard in your application, choose the Custom authentication approach. This approach offers the freedom to build a unique and tailored authentication experience that aligns with your application's specific needs.

However, it's a more advanced approach that needs more work as it requires implementing specific authentication scenarios like QR Code scanning, 2FA, and One-Time Password by yourself.


Recommended Steps for Account Management Integration

We assume that you have chosen the Hosted Auth method, as the majority of our customers do:

  • Add a "Connect an account" button to your product. Upon clicking this button, use our Hosted Auth API to generate a unique link for the user and redirect them to it.
  • Create a database to store your users' connected accounts. Suggested structure: id | user_id (yours) | account_type (LINKEDIN, GMAIL, WHATSAPP, etc.) | account_id | status (OK, CREDENTIALS, etc.) | last_update (datetime) | created_on (datetime)
  • Create a backend endpoint to handle calls from our API when a user successfully connects their account. In this endpoint, you will store the account_id of the account the user just connected, linked to your internal user_id (we provide this to simplify matching).
  • Create a landing page for the user upon successful (and failed) connection that will refresh their list of accounts stored on your side. For each account on your list, you may need to add a "Reconnect" button, which handles the same Hosted Auth API process but with the parameter "reconnect".
  • Set up a webhook in our API to handle account status changes.
  • Create a backend endpoint to process the webhook for status changes and compare the new status with the stored one. If there's a change, you can update the status and initiate some actions. The most critical status is CREDENTIALS, which requires user action to reconnect. You can send an email to your customers asking them to reconnect (or just display it in the UI).

Google Chrome Extension case

If your application has a browser extension and want to connect LinkedIn account, you can implement One-Click authentication by utilizing the collected cookie of the account you want to connect and make a Custom authentication with cookies. When you receive the webhook notification for account disconnection, you can collect a new cookie and use the 'reconnect' method without any action of your user. This ensures a seamless user experience.


What’s Next

Learn how to implement account connection in your app with Unipile's methods