Documentation

Account Deletion

Sync account closure in both directions: your platform can close the LoginSign connection via API, and LoginSign notifies you via webhook when a user removes your app or when you delete the connection.

1. Developer closes account (API)

When the user closes their account on your platform, call our API to delete the connection so they are also disconnected from LoginSign for your app.

DELETE/api/developer/applications/:appId/users/:connectionId

Requires developer session (cookie). Permanently deletes the user's connection to your app. Your webhook (if set) receives user_account_deleted.

// Example
await fetch(`${API_URL}/api/developer/applications/${appId}/users/${connectionId}`, {
  method: 'DELETE',
  credentials: 'include'
});

2. Webhooks (LoginSign → your server)

Configure a Webhook URL in Console → Settings. LoginSign POSTs JSON to that single URL for account events below and for license events. Branch on type. Respond with 2xx. Failed deliveries are logged and do not roll back the change. You can send a sample event from Console → Settings → test webhook.

connection_deleted

Sent when the user removes your app from their LoginSign dashboard (or revokes access).

{
  "type": "connection_deleted",
  "connectionId": "clx...",
  "userId": "AB1234",
  "aliasEmail": "user@example.com",
  "applicationId": "your-app-id",
  "reason": null,
  "deletedAt": "2025-02-21T12:00:00.000Z"
}

Use this to remove or flag the user on your side (e.g. disable their account, delete local data).

user_account_deleted

Sent when the developer deletes the connection via the API (DELETE above), or when the connection is permanently removed.

{
  "type": "user_account_deleted",
  "applicationId": "your-app-id",
  "connectionId": "clx...",
  "userId": "AB1234",
  "aliasEmail": "user@example.com"
}

Sync: delete or anonymize the user on your platform.

license_activated / license_updated / license_deactivated

Same webhookUrl. Fired after redeem, Console assign, partner redeem, marketplace upgrade/downgrade, revoke, or refund. Failed redeem during OAuth does not send an event. Full marketplace contract: Marketplace licenses.

{
  "type": "license_activated",
  "applicationId": "app_123",
  "code": "LS-NRS97-RPPEX-SSCZF-Z7HMB",
  "marketplaceLicenseKey": "3794577C-3DBC-11EC-9BBC-0242AC130002",
  "globalId": "AB1234",
  "connectionId": "conn_123",
  "variant": { "id": "var_123", "name": "Tier 2" },
  "duration": "LIFETIME",
  "state": "ACTIVE",
  "tier": 2,
  "occurredAt": "2026-09-13T10:00:00.000Z"
}
  • license_activated — first successful bind of a code to a connection.
  • license_updated — an already-bound user moved to a new key or tier.
  • license_deactivated — code expired by revoke, refund, or marketplace deactivate.

marketplaceLicenseKey, globalId, connectionId, variant, duration, state, and tier may be null when they do not apply.

Summary

  • User removes your app in LoginSign → you receive connection_deleted.
  • You call DELETE (user closed account on your site) → connection is removed and you receive user_account_deleted.
  • A license binds, upgrades, or expires → you receive license_activated, license_updated, or license_deactivated.

Implement your webhook endpoint to accept POST with Content-Type: application/json and respond with 2xx so we don't retry unnecessarily.

Related docs