Connection Status
The connection status indicates whether Unipile can access data from the provider. Once an account is linked, it is considered operational and begins operating normally. However, certain expected scenarios can cause the connection to drop. Your application should monitor these cases so you can notify users and prompt them to take the appropriate action.
🟢 Operational
status is running.
Everything is ok.
You should be able to call API Methods and receive realtime events.
🟡 Authentication required
status is disconnected.
The credentials of the accounts used to grant access are expired or revoked.
Why accounts get disconnected and require authentication ?
In many cases, it can be obvious, but in some others, it can be because of a bad implementation. Here is all the cases where accounts require authentication:
- The owner change his password
- The owner revoke access / terminate session to your app from the provider settings
- The owner use a platform feature to logout the account from everywhere
- The account was not used for a long time
- Your app does not respect the provider's Limits and Restrictions and make too many requests to sensitive endpoints.
- The account is not warmed up. For exemple, new accounts sending messages in bulk can be suspicious.
- When using cookies authentication method, the owner logout from the browser used to retrieve the cookies.
- When using cookies authentication method, the user agent is wrong.
Calling API Methods should return a 401 - provider/invalid_authorization error and you won't receive any more realtime events from this account (except account.status.xxx types).
What to do ?
In this case, the owner of the account must authenticate again using the Provider Authentication API by passing the account_id in Create Auth Link if your using Hosted Auth or in Start Auth Intent if you are using Custom Auth.
Then the account should be back to Operational.
🟠 Service interruption
status is errored
There is some issues with the linked account. This can occur if :
- The Proxy used between Unipile and the provider is down
- The provider is down
- Unipile encounter infrastructure issues
You won't receive any more realtime events from this account (except account.status.xxx types). Calling API Methods might work in some cases, otherwise it should return 5xx error codes.
What to do ?
In this case, Unipile will automatically try to bring accounts back to Operational using retries.
- If the reason is the proxy, you can provide a new one (See Proxys guide).
- For other reasons, the only thing you can do is warn your users about it.
🟣 Paused
status is paused
The account has been paused because the organization does not have an active subscription.
You won't receive any more realtime events from this account. Calling API Methods should return a 403 - api/inactive_subscription.
What to do ?
In this case, make sure your subscription is active and there is no awaiting payments.
Track connection status
To keep track about accounts status, you must Configure a webhook listening to account.status.running, account.status.disconnected and account.status.errored events.
Updated 4 months ago