Skip to main content

Twitter Plugin for GAME SDK

The Twitter Plugin provides a lightweight interface for integrating Twitter (X) functionality into your GAME SDK agents. Built on top of virtuals_tweepy by the Virtuals team — a maintained fork of Tweepy) — this plugin lets you easily post tweets, fetch data, and execute workflows through agent logic.

📜 GAME X API Usage Terms & Rules

By using our GAME API, you agree to the Terms of Use and GAME X API Terms.

🚀 API Access Tiers

Virtuals sponsors the community with a Twitter Enterprise API access plan, using OAuth 2.0 with PKCE. This provides:

🚀 API Access Tiers

Tier 1 — Default

  • Higher rate limits: 50 calls / 5 minutes
  • Smoother onboarding
  • Free usage via your GAME_API_KEY

Tier 2 — Elevated

  • Even higher rate limits
  • Requires approval from the Virtuals team. Request access via Discord → @virtualsio

Use it standalone or compose multiple Twitter actions as part of a larger agent job.

Installation

You can install the plugin using either poetry or pip:

# Using Poetry (from the plugin directory)
poetry install

or

# Using pip (recommended for integration projects)
pip install twitter_plugin_gamesdk

Authentication Methods

Virtuals sponsors the community with a Twitter Enterprise API access plan, using OAuth 2.0 with PKCE. This provides:

  • Higher rate limits: 35 calls / 5 minutes
  • Smoother onboarding
  • Free usage via your GAME_API_KEY

1. Get Your Access Token

Run the following command to authenticate using your GAME_API_KEY:

poetry run twitter-plugin-gamesdk auth -k <GAME_API_KEY>

This will prompt:

Waiting for authentication...

Visit the following URL to authenticate:
https://x.com/i/oauth2/authorize?...

Authenticated! Here's your access token:
apx-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

2. Store Your Access Token

We recommend storing environment variables in a .env file:

# .env

GAME_TWITTER_ACCESS_TOKEN=apx-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Then, use load_dotenv() to load them:

import os
from dotenv import load_dotenv
from twitter_plugin_gamesdk.twitter_plugin import TwitterPlugin

load_dotenv()

options = {
    "credentials": {
        "game_twitter_access_token": os.environ.get("GAME_TWITTER_ACCESS_TOKEN")
    }
}

twitter_plugin = TwitterPlugin(options)
client = twitter_plugin.twitter_client

client.create_tweet(text="Tweeting with GAME Access Token!")

Examples

Explore the examples/ directory for sample scripts demonstrating how to:

  • Post tweets
  • Reply to mentions
  • Quote tweets
  • Fetch user timelines
  • And more!

API Reference

This plugin wraps virtuals_tweepy, which is API-compatible with Tweepy’s client interface. Refer to their docs for supported methods and parameters.


Metadata

Release files for twitter-plugin-gamesdk 0.2.11

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for twitter-plugin-gamesdk 0.2.11
File Size Uploaded
twitter_plugin_gamesdk-0.2.11.tar.gz 4.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for twitter-plugin-gamesdk 0.2.11
File Interpreter ABI Platform
twitter_plugin_gamesdk-0.2.11-py3-none-any.whl Python 3 none any Details

Total release size: 11.0 kB

Release files / twitter_plugin_gamesdk-0.2.11.tar.gz

Download URL twitter_plugin_gamesdk-0.2.11.tar.gz
Size 4.9 kB
Tags Source
SHA-256 checksum
How to use checksums
32539ee3260f58d77d63c245241b24d82ddceec1c2f05a3056a93b96b7bdd03c
BLAKE2b-256 checksum
How to use checksums
90a1530363b788560fd532fc10d899b55aabe37d3e73073718cf506eac66a2fd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.1.1 CPython/3.13.5 Darwin/24.3.0

Release files / twitter_plugin_gamesdk-0.2.11-py3-none-any.whl

Download URL twitter_plugin_gamesdk-0.2.11-py3-none-any.whl
Size 6.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c41c448d9d56e34b67204fa958acf771c417f4da49b0916b57a7e5fbd41ede52
BLAKE2b-256 checksum
How to use checksums
e1341803e0b0480bbac062647d697da4ab728a33b06544cb58c48e50e9ef45b0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.1.1 CPython/3.13.5 Darwin/24.3.0

Release history Release notifications | RSS feed

This release

0.2.11 This release

2 release files

0.2.10

2 release files

0.2.9

2 release files

0.2.8

2 release files

0.2.7

2 release files

0.2.6

2 release files

0.2.5

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page