Wrapper of XClientTransaction in a Flask server. 🐦
🌐 Public instance: https://x-client-transaction-id-generator.xyz
python3 -mvenv .venv
source ./.venv/bin/activate
pip install -r requirements.txt
python generate_secret_token.pyLaunch:
python app.pyType: GET
Get a x-client-transaction-id header value.
Parameters:
path: Path to the x API.- Required
- Example value:
/i/api/graphql/1VOOyvKkiI3FMmkeDNxM9A/UserByScreenName
Returned value
Type: JSON
{"x-client-transaction-id": "<transaction_id>"}Caution
If path is missing, returns code 400 with response:
{"error": "Missing required parameter 'path'"}Example
/generate-x-client-transaction-id?path=/i/api/graphql/1VOOyvKkiI3FMmkeDNxM9A/UserByScreenName
Type: GET
Reset the session managing the creation of transaction IDs.
It might be useful to call this once, if the generated x-client-transaction-id don't work anymore
Parameters:
token: token that gives you the right to reset the session. An unique token is created when you call run python generate_secret_token.py and is stored in reset-session-token-secret.txt. The request succeeds only if the passed token matches the one in reset-session-token-secret.txt- Required
- Example value:
64nHYRvXaWElVBMHPp6xTedpGuzelTgrhOft4ESrzvTQ4whuQKeUO_i-i9s-Oz4QkOQFvgfjxQcvJG5LK9rfmQ==
Returned value
Type: JSON
{"message": "Session reinitialized successfully"}Caution
If token is missing, or invalid, returns 401 error with the following body:
{"error": "Invalid token"}Example
/reset-session?token=64nHYRvXaWElVBMHPp6xTedpGuzelTgrhOft4ESrzvTQ4whuQKeUO_i