How to handle accounts that have stopped or gone invalid.
- Recommended: Ensure you subscribe to webhooks
account.invalid
- Else poll the account endpoint every 30 min to determine ifsync_state
= invalid - Additionally - especially with non-read scopes such as email.send
If you receive 401 or 403 on the /send endpoint re-authenticate
If you receive a 403 on any endpoint that is NOT /send ensure thebilling_state
= paid via the /account endpoint - Prompt: The customer to re-authenticate
- Ensure: You delete old tokens using /revoke-all - while passing the most recent token in
keep_access_token
How to handle accounts that wish to cancel / recover cancelled accounts.
- Use the downgrade endpoint - cancelled accounts will be delete after 3 days
- If account wishes to reconnect
- Check if the token
state
is still valid via the /token-info endpoint - If
valid
, hit /upgrade - this removes the need for customers to authenticate again - If
invalid
or 404 (token deleted) then prompt for authentication- Ensure you delete old tokens using /revoke-all - while passing the most recent token in
keep_access_token
- Ensure you delete old tokens using /revoke-all - while passing the most recent token in
Resources
How to determine if an account is stopped
Updated
Comments
0 comments
Please sign in to leave a comment.