Skip to main content

X (Twitter)

The X (formerly Twitter) Legacy Identity Provider (LIDP) integrates one of the web's largest public social graphs into the Nostr and Lightning ecosystem.

Identifier Format

The canonical identifier for X is the user's handle (username), stripped of the @ symbol and lowercased.

  • Raw Format: handle (e.g., jack)
  • Resolved URI: x:jack

Privacy Model: Public

Like Discord, X is treated as a Public identity.

In the user's Kind 35521 (Identity Connection) event, the content field will typically publish the raw handle in plaintext to enable global search and discovery across Zapf clients. The d tag maintains protocol compliance containing the SHA256 hash of x:jack.

Verification Flow (OAuth)

Identity Authorities verify X ownership using OAuth 1.0a or OAuth 2.0.

  1. Scope: tweet.read, users.read
  2. Endpoint: https://api.twitter.com/2/users/me
  3. Evidence: Yes. Modern X OAuth 2.0 produces standard bearer tokens that can be shared across IAs.

Expected JSON Profile

When a client resolves an X identity, the IA provides standardized metadata.

{
"id": "12",
"username": "jack",
"name": "jack",
"profile_image_url": "https://pbs.twimg.com/profile_images/1115644092329758721/AFjOr-K8_normal.jpg",
"provider": "x"
}

Evidence Sharing Payload

Because X supports OAuth, the IA generates a portable evidence payload encrypted via NIP-44 for use in Evidence Sharing.

// Inside the decrypted NIP-44 payload
{
"provider": "x",
"access_token": "V0p...xyz",
"token_type": "bearer",
"expires_in": 7200,
"scope": "users.read tweet.read"
}