Primary adapter

X/Twitter adapter for GraphQL reads and session-aware workflows.

The X/Twitter adapter is the deepest Nimbipost implementation. It supports guest sessions, auth-token bootstrap, login flow pieces, Following timeline reads, GraphQL pagination, model normalization, and transaction ids.

Adapter capabilities.

The adapter hides X/Twitter-specific request details behind the shared Nimbipost contract.

GraphQL reads

Resolve users, posts, home and Following timelines, friends, and search results through normalized SDK methods.

Session bootstrap

Start from guest access or use an authToken to bootstrap the matching CSRF cookie.

Pagination

Keep caller-facing pagination stable while the adapter handles upstream cursors and SDK-side time filters.

Transaction ids

Inject X-Client-Transaction-Id through the local transaction generator integration.

TypeScript usage.

Use the same factory as every other platform, then pass X-specific credentials when required.

src/x.ts TypeScript
import { createPlatformAdapter } from 'nimbipost';

const x = createPlatformAdapter('x', {
  authToken: process.env.X_AUTH_TOKEN,
});

const userId = await x.getUserId('barton6026');
const posts = await x.getUserPosts(userId, { total: 100 });
const followingTimeline = await x.getFollowingTimeline?.({
  total: 20,
  enableRanking: false,
  since: '2026-06-01T00:00:00Z',
  until: '2026-06-13T23:59:59Z',
});
const search = await x.search('from:barton6026', {
  searchFilter: 'Latest',
});

Compatibility notes.

X/Twitter-specific aliases stay available while the shared interface uses generic post language.

  • getUserTweets remains as an alias for getUserPosts.
  • getTweet remains as an alias for getPost.
  • getLikedTweets remains as an alias for getLikedPosts.
  • getTweetLikes remains as an alias for getPostLikes.
  • getRetweeters remains as an alias for getReposters.
  • getFollowingTimeline reads the account's Following timeline with optional enableRanking, since, and until options.

Need the same adapter over HTTP?

Run the Nimbipost HTTP Gateway and call the X/Twitter adapter through route-based backend integrations.

Open Gateway guide