You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are attempting to enable the Eliza AI bot to post tweets using the agent-twitter-client setup as described in the Eliza documentation. We have the bot running smoothly via Telegram and the character are starting to behave exactly as wanted. Next step is Twitter/X posts.
Despite following the documented process and adapting various approaches, we encountered multiple challenges, including issues with cookies-based authentication and OAuth2 flow.
Steps Taken:
Cookies Authentication:
Extracted cookies (auth_token, ct0, guest_id) directly from a valid, logged-in Twitter session.
Parsed cookies into the required format and supplied them to the scraper.
Encountered Session is invalid. Login required. after setting the cookies.
Retried using different extracted cookies after logging out and back into the account but received suspicious login alerts from Twitter.
OAuth2 Authentication (User Context):
Configured the TWITTER_CLIENT_ID, TWITTER_CLIENT_SECRET, and TWITTER_REDIRECT_URL in .env file.
Generated the authorization URL and successfully obtained an authorization code after approving the app.
Exchanged the authorization code for an access token. This step initially failed due to redirect URI mismatch but was resolved after fixing .env and redirect configurations.
Successfully retrieved an access token but encountered a 403 Forbidden error when attempting to post a tweet using the provided access token.
Other Efforts:
Tested multiple approaches to ensure the server was running properly (ngrok tunnel, express server for callback handling).
Used the provided Eliza example retry mechanisms, cookies validation steps, and OAuth2 flows, but no approach successfully enabled the bot to interact with Twitter.
Technical Environment:
Eliza Package Version: 0.1.4-alpha.3
Node.js Version: v23.0.0
Twitter API Version: v2
Plan: Free tier with 100 monthly interactions allowed.
Errors Encountered:
Cookies Authentication Error: Session is invalid. Login required.
OAuth2 Access Token Exchange Error: "Value passed for the redirect uri did not match the uri of the authorization code."
OAuth2 Post Tweet Error:
{
"title": "Forbidden",
"type": "about:blank",
"status": 403,
"detail": "Forbidden"
}
What We’ve Tried:
Followed the Eliza documentation for both cookies-based login and OAuth2 authentication.
Validated cookies format, paths, and domains. Adjusted callback URLs to match the redirect URI.
Ensured correct scopes (tweet.read, tweet.write, offline.access) were included in the authorization URL. Searched for solutions in related GitHub issues and documentation but could not resolve these issues.
Questions:
Cookies-based login: Is there an additional step needed to validate or reuse cookies without triggering suspicious login alerts?
OAuth2 Post Tweet Forbidden: Are there any known limitations or configurations for the free tier that could block posting tweets, even after successfully obtaining an access token?
Documentation Alignment: Are there updated instructions or examples specific to the latest Twitter API v2 and free-tier limitations that might clarify the proper setup?
Additional Notes:
The primary goal is to enable the Eliza bot to post tweets under the speedcto account using either method (cookies or OAuth2).
The free-tier plan should suffice for our initial testing (17 tweets/day, 100 interactions/month).
Any guidance or updates on how to resolve these issues would be highly appreciated!
The text was updated successfully, but these errors were encountered:
Hey Guys!
We are attempting to enable the Eliza AI bot to post tweets using the agent-twitter-client setup as described in the Eliza documentation. We have the bot running smoothly via Telegram and the character are starting to behave exactly as wanted. Next step is Twitter/X posts.
Despite following the documented process and adapting various approaches, we encountered multiple challenges, including issues with cookies-based authentication and OAuth2 flow.
Steps Taken:
Cookies Authentication:
Extracted cookies (auth_token, ct0, guest_id) directly from a valid, logged-in Twitter session.
Parsed cookies into the required format and supplied them to the scraper.
Encountered Session is invalid. Login required. after setting the cookies.
Retried using different extracted cookies after logging out and back into the account but received suspicious login alerts from Twitter.
OAuth2 Authentication (User Context):
Configured the TWITTER_CLIENT_ID, TWITTER_CLIENT_SECRET, and TWITTER_REDIRECT_URL in .env file.
Generated the authorization URL and successfully obtained an authorization code after approving the app.
Exchanged the authorization code for an access token. This step initially failed due to redirect URI mismatch but was resolved after fixing .env and redirect configurations.
Successfully retrieved an access token but encountered a 403 Forbidden error when attempting to post a tweet using the provided access token.
Other Efforts:
Tested multiple approaches to ensure the server was running properly (ngrok tunnel, express server for callback handling).
Used the provided Eliza example retry mechanisms, cookies validation steps, and OAuth2 flows, but no approach successfully enabled the bot to interact with Twitter.
Technical Environment:
Eliza Package Version: 0.1.4-alpha.3
Node.js Version: v23.0.0
Twitter API Version: v2
Plan: Free tier with 100 monthly interactions allowed.
Errors Encountered:
Cookies Authentication Error: Session is invalid. Login required.
OAuth2 Access Token Exchange Error: "Value passed for the redirect uri did not match the uri of the authorization code."
OAuth2 Post Tweet Error:
{
"title": "Forbidden",
"type": "about:blank",
"status": 403,
"detail": "Forbidden"
}
What We’ve Tried:
Followed the Eliza documentation for both cookies-based login and OAuth2 authentication.
Validated cookies format, paths, and domains. Adjusted callback URLs to match the redirect URI.
Ensured correct scopes (tweet.read, tweet.write, offline.access) were included in the authorization URL. Searched for solutions in related GitHub issues and documentation but could not resolve these issues.
Questions:
Cookies-based login: Is there an additional step needed to validate or reuse cookies without triggering suspicious login alerts?
OAuth2 Post Tweet Forbidden: Are there any known limitations or configurations for the free tier that could block posting tweets, even after successfully obtaining an access token?
Documentation Alignment: Are there updated instructions or examples specific to the latest Twitter API v2 and free-tier limitations that might clarify the proper setup?
Additional Notes:
The primary goal is to enable the Eliza bot to post tweets under the speedcto account using either method (cookies or OAuth2).
The free-tier plan should suffice for our initial testing (17 tweets/day, 100 interactions/month).
Any guidance or updates on how to resolve these issues would be highly appreciated!
The text was updated successfully, but these errors were encountered: