xdevplatform/samples

Sample code for the X API v2 endpoints

View on GitHub ↗Jump to charts ↓

Data as of . Signed-in members get hourly updates — create a free account.

Summary Information

Updated 2 hours ago
Added to GitGenius on September 21st, 2026
Created on August 12th, 2020
Open Issues & Pull Requests: 106 (+0)
GitHub issues: Enabled
Number of forks: 1,094
Total Stargazers: 3,208 (+0)
Total Subscribers: 69 (+0)

Repository Insights (GitGenius)

Median issue/PR response: 23.5 days
Mean response time: 186.2 days
90th percentile: 595.7 days
Tracked items: 14

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 19
New in 7 days: 0
Closed in 7 days: 0
Avg open age: 609 days
Stale 30+ days: 18
Stale 90+ days: 17

Recent activity

Opened in 7 days: 0
Closed in 7 days: 0
Comments in 7 days: 1
Events in 7 days: 1

Top labels

  • bug (22)

Most active issues this week

Sign in to see which issues are moving.
Sign in

Detailed Description

X API v2 Sample Code is a collection of working code examples for the X API v2 across multiple programming languages.

The repository addresses the need for developers to understand how to interact with X API v2 endpoints by providing ready-to-run sample code. It covers the full range of API functionality including posts, users, timelines, streams, lists, spaces, bookmarks, direct messages, media upload, compliance, and usage tracking. Examples are organized by category and authentication type, with support for Bearer Token authentication for read-only operations, OAuth 2.0 PKCE for user actions like posting and liking, and OAuth 1.0a for legacy endpoints.

Developers should choose this repository if they are building applications that integrate with the X platform and need concrete examples before writing their own code. The samples span Python, JavaScript, Ruby, Java, and R, making it suitable for teams using different technology stacks. Coverage varies by language and feature; Python has the most comprehensive examples including direct messages and media upload, while other languages focus on core functionality like posts, users, spaces, and compliance operations. The repository includes an llms.txt context file and api-index.json for machine-readable endpoint information, supporting both human developers and AI-assisted development workflows.

The project maintains active coverage across multiple programming languages with consistent example implementations. Documentation is structured around practical authentication setup and quick-start guidance rather than API reference material. The repository includes supplementary resources designed for integration with language models and automated tooling alongside traditional developer documentation.