Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting logged out of account when we post multiple tweets #642

Open
sahas-si opened this issue Nov 26, 2024 · 3 comments
Open

Getting logged out of account when we post multiple tweets #642

sahas-si opened this issue Nov 26, 2024 · 3 comments

Comments

@sahas-si
Copy link

Our usecase: We want to post 10-20 tweets every 10 min. We are using premium account to overcome the 280 char limit.

Issue: We are facing an issue with API_KEY authentication. I followed the browser steps & copied the API key from incognito & closed the browser. The API_KEY works for the first execution & we are able to post the tweets. But, in next cron invocation, the API_KEY returns fails to authenticate. So, we are unable to post the tweets for a continuous period.

I tried to generate the API Key using CLI trying out multiple combinations of username, email, password but getting returning empty object response. But, I'm getting a mail from twitter about a new login.

Have few queries on this:

  1. How to overcome this? Should I login with the retwitt auth during every cron invocation?
  2. Is there any sensible tweet post limits? Adding delay would be helpful here?
@Rishikant181
Copy link
Owner

I think this might be be because of the x-client-transaction-id header missing from the outgoing request. I checked the HTTP requests to Twitter an it turns out almost all post requests now use this header, so it might be that Twitter/X is using this header to detect bots. GET requests work fine though.

@Timtendo12
Copy link

I think this might be be because of the x-client-transaction-id header missing from the outgoing request. I checked the HTTP requests to Twitter an it turns out almost all post requests now use this header, so it might be that Twitter/X is using this header to detect bots. GET requests work fine though.

Is there a way to fix this? I keep getting logged out too every ~24h from just fetching tweets

@Rishikant181
Copy link
Owner

@sahas-si There is a way to generate the header used by another project here, but it's written in Go so it needs to ported to TS.

Another thing which I haven't tried is to copy over the header from your browser's devtools and use it in Rettiwt, but I'll need to check if it works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants