For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to page URLs.
Skip to content

X (Twitter)

Connect X (Twitter) to Membership — let your users sign in with X.

Lets your users sign in with their X account, through an app in the X developer console.

Get your credentials

  1. Sign in to the X developer console (console.x.com) and press Create App. Give the name, description and use case.

  2. Open Keys and tokens and copy the API Key and the API Key Secret (the consumer keys). They are shown only once — store them at once.

  3. Under the user authentication settings, add your app's callback URL to the allowlist. It must match exactly, trailing slash included; use https:// in production.

Source: X, Developer apps.

Connect it in Cloud

Where: Membership → Integrations → Add New Integration → X (Twitter) → Connect · /projects/<project>/membership/integrations/new/x

Fill the form and press Save. The form stays open as Editing X integration with the ENABLED badge and the new id (int_2FDHQBCdPdhqykkcyTXzfx).

Field
Required
What it does
Example

API Key

yes (new)

The consumer API key.

example-api-key

API Secret Key

yes

The consumer API key secret. Encrypted on save and never shown again.

example-not-a-secret (made up)

Integration Name

yes

The name in your integrations list.

X sign-in

OAuth Modes — press Add OAuth mode for each surface of your app (web, mobile, admin) that signs in with this provider:

Field
Required
What it does
Example

Mode name

yes

A name for the surface.

web

Callback URL

yes

Where the user lands in your app after signing in.

https://app.example.com/auth/x/callback

Logout URL (optional)

no

Where the user lands after signing out.

—

Failure redirect URL (optional)

no

Where the user lands when the sign-in fails.

https://app.example.com/sign-in?failed=1

Role to assign on first sign-in (optional)

no

The role a new user gets on the first sign-in.

—

New X Integration form: API Key example-api-key, a hidden API Secret Key, Integration Name X sign-in
The filled form.
OAuth Modes with one mode: Mode name web, Callback URL https://app.example.com/auth/x/callback, Failure redirect URL https://app.example.com/sign-in?failed=1, and Add OAuth mode
One OAuth mode for the web app.
Editing X integration after save: the ENABLED badge, the id int_2FDHQBCdPdhqykkcyTXzfx, the provider fields empty and the Integration Name X sign-in
After save.

Test and set as default

Membership integrations have no Test and no Set as default in Cloud — see Test an integration and Set an integration as default. Check the values against the provider's console; Actions → Disable turns the integration off — see Disable or delete an integration.

Common errors

Message
Cause
Fix

Required under a field

A required field is empty.

Fill it; on a saved integration, type the secret again.

Secret is not provided (CM-ERRORS-SECRETS-001)

Saved from code without the secret.

Send the secret on every save.

Callback URL not approved (at X)

The callback URL is not in the allowlist of the app.

Add the exact URL in the user authentication settings.

Messages marked (at …) are the provider's own, shown to the user while signing in; see the provider documentation.

Do it from code

With the SDK, send the same object as integration to saveMembershipIntegration — see the run example on Providers and in Save Membership Integration. Send isEnabled: true; to update, add the id as integrationId and the secret again. API: Save Membership Integration

Last updated