Skip to main content

X (Twitter) — Authentication

B
Written by Ben Keeling

A plain-language overview of the access we'll request, what each permission lets us do, who on your team should connect, and what to expect during setup.



What to expect

Connecting takes a couple of minutes. When you add the X integration in Medialake, you'll be redirected to the official X authorization screen, which lists — in X's own words — what the app will and won't be able to do with the account. You approve it yourself and can revoke access at any time. We never see or store your password — the login happens entirely on x.com, and once you approve you're returned to Medialake.

We follow the principle of least privilege: we only request the access the work actually needs. X is a posts-and-media integration — we never post, reply, like, repost, follow, message, or change anything on your account. All data is read through the official X API v2.

 You                    Medialake                    X
  │  connect source         │                         │
  │────────────────────────▶│                         │
  │  redirect to X          │                         │
  │◀────────────────────────│                         │
  │  sign in & authorize    │                         │
  │──────────────────────────────────────────────────▶│
  │  redirect with code     │                         │
  │◀──────────────────────────────────────────────────│
  │                         │  exchange code          │
  │                         │────────────────────────▶│
  │                         │  access + refresh token │
  │                         │◀────────────────────────│
  │  source authorized      │                         │
  │◀────────────────────────│                         │
  │                         │  renews automatically   │
  │                         │────────────────────────▶│


Verifying it's really us

On X's authorization screen, check that the app requesting access is:

  • App name: Medialake

If the app name doesn't match, stop and contact us. Never approve an X access request you weren't expecting.


Who should do the connecting

This one works differently from Meta or Google: X has no page or delegate concept for app authorization. The tokens belong to whichever account is signed in on x.com when the authorization screen is approved — so to connect your brand account, someone must be signed in to x.com as the brand account itself (not their personal account, and not via X's delegate/team access, which does not carry over to app authorizations).

Practically, that means the person connecting needs:

  1. The brand account's login credentials, and

  2. Access to its two-factor authentication and/or the email inbox on the account, since X may send a verification code during sign-in.

The upside of this model: the connection belongs to the brand account, not to an employee. It keeps working when team members leave — it only stops if the account's password or security settings change, or access is revoked.


You choose what we sync

After you approve and are redirected back to Medialake, the connected account appears as a single selectable source — one connection maps to one X account. To sync several brand handles, connect each one separately. Medialake can only ever read the account that authorized; no other account's data is reachable with these tokens.


The permissions we request

Permission (scope)

What it lets us do

How we use it

Read the account's posts, including the media attached to them.

READ ONLY

See the account's profile basics — id, name, @handle, profile photo — to confirm which account connected.

READ ONLY

Receive refresh tokens so the connection renews itself without you re-approving.

Token renewal only

X's authorization screen shows these as a plain-English list of what the app can and cannot do — you'll see that posting, following, and account changes are not included. X's own description of every scope is in its OAuth 2.0 documentation.


What we can't see or do

Regardless of the scopes granted, we cannot:

  • See or store your password, or log in as you on x.com

  • Post, reply, quote, like, repost, follow, or delete anything

  • Read or send Direct Messages

  • Change any account or security settings

  • Access any account other than the one that authorized


Staying connected

X access tokens are short-lived (about two hours), and X issues rotating refresh tokens — each renewal returns a fresh one, which Medialake handles automatically in the background. There's no fixed expiry to plan around. The connection stops working only if access is revoked, or if the account's password or security settings are reset — in that case just reconnect from the X integration in Medialake; it takes a minute.


Revoking access

You're in control at any time. To remove Medialake:

  • On x.com: Settings → Security and account access → Apps and sessions → Connected apps → select the Medialake app → Revoke app permissions, or

  • Disconnect the X source from its settings page in Medialake.

Revoking on X invalidates the tokens immediately and data collection stops without any action needed from us.


Troubleshooting

Issues while connecting typically come down to being signed in to the wrong X account when approving (check the account shown on the authorization screen), or not having the brand account's two-factor device or email inbox to hand for the sign-in verification step. If you get stuck, contact [email protected] and we'll walk you through it.


Further reading (X documentation)


You can review or withdraw access at any time from your X account's connected apps settings.

Did this answer your question?