Synchronisation
This module groups all synchronization areas between LoginSign and your platform: account deletion, email, status, license inventory, marketplace events, current logins, and user import.
Scope
1. Account Deletion Sync
If a user deletes their account on your platform, call LoginSign's delete endpoint to remove the corresponding connection.
DELETE /api/developer/applications/:appId/users/:connectionId
Full payload/event examples are available in Account Deletion.
2. Webhook Events (LoginSign -> your backend)
Configure your webhook endpoint in the Console to receive state changes.
connection_deleted- user removed your app from LoginSign.user_account_deleted- connection was removed by API/developer action.email_changed- primary user email changed and must be synced on your side.license_activated/license_updated/license_deactivated— redeem, assign, marketplace upgrade/downgrade, or refund. SamewebhookUrl. Payloads: Marketplace licenses.
3. License inventory and marketplace writes
Pull every license code for your app in one request. No portal session is required.
GET /api/applications/:appId/licenses
Basic Auth (client_id:client_secret). Response: { codes, total, summary }, including marketplace fields. Full contract: License Sync.
The same Basic Auth surface can generate, import, look up, redeem, and revoke codes, and ingest AppSumo-style events. Buyers activate without typing a code at /activate/:appId. Hosted AppSumo URLs and event semantics: Marketplace licenses.
4. OAuth token error handling
During token exchange, LoginSign can return invalid_grant if the authorization code is expired, invalid, already used, or the redirect URI does not match.
{
"error": "invalid_grant",
"error_description": "The authorization code has expired"
}Recommended handling
- Start a fresh OAuth flow and request a new authorization code.
- Ensure
redirect_uriis identical between authorize and token exchange. - Use every authorization code only once.
- Exchange the code immediately after callback.