Using API v2 for posting

This commit is contained in:
2025-10-29 22:01:18 +09:00
parent 8f38bc82a0
commit 9b8e79877f
2 changed files with 32 additions and 23 deletions

View File

@@ -57,6 +57,8 @@ An automated Twitter bot that generates and posts tweets using Google Gemini's f
- Navigate to "User authentication settings"
- Set app permissions to "Read and Write"
**Note:** This application uses Twitter API v2 for posting tweets (compatible with Free and Basic access tiers) and v1.1 for media uploads.
### 3. Configure the Application
1. Copy the example environment file:
@@ -373,6 +375,10 @@ Ensure your `.env` file exists and contains all required variables.
2. Verify your app has Read and Write permissions
3. Regenerate access tokens if needed
### "You currently have access to a subset of X API V2 endpoints" (403 error code 453)
This error means your Twitter API access level doesn't support v1.1 tweet posting. The code has been updated to use API v2 which is supported by all access tiers (Free, Basic, Pro). Make sure you're using the latest version of the code.
### "Failed to generate tweet"
1. Verify your Gemini API key is valid