What you need in your app
Follow Getting Started for a full implementation. For concepts only, see the Cryptography primer.
How encryption works (overview)
- Create identity and signing keypairs; store private keys securely (Juicebox or protected blob).
- Publish public keys so others can wrap conversation keys to you and verify signatures.
- Share a conversation key by posting encrypted copies for each participant.
- Encrypt and sign outbound messages; send only ciphertext to X.
- Receive ciphertext via webhooks, stream, or event history.
- Verify and decrypt with the Chat XDK.
Useful endpoints
Grouped under API reference in the sidebar, including:- Public keys — register and fetch
- Conversations and messages — list/get threads, add/rotate keys, events, send, typing, read, group membership
- Media — upload and download encrypted attachments (guide)
Auth notes
Use OAuth 2.0 user context with DM-related scopes (dm.read, dm.write, plus users.read / tweet.read as required; media.write for uploads). X Chat activity for a user requires that user’s authorization. Juicebox config for PIN storage is returned on your public-key record (juicebox_config field)—see Getting Started.
Next steps
- Cryptography primer — optional background on E2EE concepts
- Getting Started — implement keys, send, and receive
- Chat XDK — encryption SDK reference
- Real-time events, Media, or Troubleshooting when you need those topics