Skip to main content
A platform user can connect their X account. It adds the X profile with follower counts to the user object and is required for the KOL badge.

Connect

POST /v1/platform-users/x/connect Returns an authorize_url. Send the user there, in a new tab or a redirect. They authorize with X and come back to your return_url. The URL is valid for 10 minutes and can be used once. When the connection succeeds, you receive the platform_user.x_connected webhook and the user object shows x.
string
required
Your id of the user. Alternatively pass csid_id.
string
required
Where the user goes back after X. Must be on one of your instance’s verified domains, registered origins or redirect URIs (https), or http://localhost.
Response

Back on your site

After X the user returns to your return_url with these query parameters: Open authorize_url in the same browser the user finishes the sign-in with X in. The link is bound to that browser so nobody else can complete it.

People who already have a CabalSpy ID

If the X account already belongs to a CabalSpy ID, the person just proved it is theirs: your user moves to that ID (platform_user.merged, new csid_id, same external_id) and status=connected comes back as usual. If that ID is already your user under another external_id, error=x_already_linked comes back and nothing changes. When the person later signs in to CabalSpy ID with this X account, they land in the same account and manage it themselves (platform_user.self_managed). Connecting X is then theirs to do: the API answers self_managed.

Disconnect

POST /v1/platform-users/x/disconnect Removes the user’s X account. A user with the KOL badge cannot disconnect X, the badge belongs to the X account.
string
required
Your id of the user. Alternatively pass csid_id.
Response
disconnected is false when the user had no X account.

Errors

See Errors for the full list.