Skip to main content
POST
Create a social-linking URL for a User Profile. Send the returned url to your user, and they open it to connect their social accounts. This is the recommended way to create a linking URL. It needs only your API key and a Profile-Key — there is no private key to send and nothing to sign. Unlike a linking URL created before, a link session is stored, so you can check whether it has been used and revoke it before it expires. The returned url signs your user into their profile, so treat it like a password and send each one to a single user. See Sending the Linking URL.
The URL is valid for 5 minutes by default. Use expiresIn to set a different window, up to 2880 minutes (48 hours).
Generate a Linking URL performs the same operation and keeps working unchanged. It accepts the legacy privateKey, base64 and verify parameters and ignores them. domain is not ignored on either endpoint - it stays optional and is still validated. New integrations should use this endpoint.One difference in the response: generateJWT returns a top-level token for backwards compatibility, and this endpoint does not. The token exists only inside the returned url. If you are migrating and your code reads token, read url instead.

Header Parameters

The Profile-Key is a header on this endpoint — there is no profileKey body parameter. If it is missing you get code: 188, whose message lists privateKey, profileKey and other legacy field names because it is shared with Generate a Linking URL. Read it as “the Profile-Key header is missing or wrong”; none of the other names in it are parameters of this endpoint.
string
Your X API Key (Consumer Key) from the X Developer Portal. When provided, the linking URL will use your own X Developer App for OAuth linking.
string
Your X API Secret (Consumer Secret) from the X Developer Portal. Required when X-Twitter-OAuth1-Api-Key is provided.

Body Parameters

number
default:5
Longevity of the link in minutes. Range: 1 to 2880 minutes.Requires the Max Pack.See JWT Expires In for more information.
boolean
default:false
Automatically log out the current session. Not recommended in production, since it affects performance.See Automatic Logout of a Profile Session.
string
A URL to redirect to when the “Done” button or logo image is clicked. Add the query parameter origin=true to redirect the opener window.
array
The social networks to display on the linking page. Overrides the networks configured on the Social Networks page.
Only display Facebook, X/Twitter, LinkedIn, and TikTok
Override which Instagram linking flow is used for this link. Valid values:
  • instagram: Direct Instagram Login, no Facebook Page required.
  • facebook: Link Instagram via a connected Facebook Page.
When omitted, the linking page uses your account-wide Instagram Login setting.
string
Optional. Your linking domain, when your account has more than one. When omitted, your account’s own domain is used. A domain not registered to your account is rejected.
object
Send a Connect Accounts email carrying the link, so your user can reach their linking page directly. Requires a to address.Requires the Max Pack. The response reports the outcome in emailSent, and a send failure returns code: 333 rather than a success response.See Connect Accounts Email.