Hi,
I’m trying to download nearly ~1.25M tweets for a particular study at work but I’m receiving Code 4 continuously: “You have encountered an error in our software. Please retry your request and contact our support team if this error persists. Code = 4”. Exact response is like this:

{“error”:{“message”:“You have encountered an error in our software. Please retry your request and contact our support team if this error persists. Code = 4”,“sent”:“2021-05-06T21:59:34+00:00”,“transactionId”:“00019681003f172b”}}

I can’t post the keywords here since I’m a new user and the system says: “Sorry, new users can only mention 2 users in a post.”. The keywords consists in mentions, hastags and other keywords.

Please help me to know if the download can be finished in any manner. Also I’m worried about quota over spend.
Thank you.

1 Like

you should be able to post if you use the preformatted text format option on the forum.

I’ve never seen a code 4 error before Twitter API Response Codes & Error Support | Twitter Developer Platform so i’ve no idea what that could be - someone from twitter might be able to help instead.

Is this with the 30day endpoint or the fullarchive one?

What implementation / code are you using to make the calls?

Also, just to make sure because it’s commonly confused: you’re not trying to use the Academic Access API? because that’s a different endpoint.

1 Like

Sorry to be late.

  • fullarchive endpoint.
  • Official twitterdev’s github code implementation, in enterprise-premium branch: https://github.com/twitterdev/search-tweets-ruby/tree/enterprise-premium
  • I’m sure not using academic access, only premium one. The error appears every a number of days/months downloaded and seems to be related to API congestions/CPU usage since when I try to download later I has no issues.
2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.

Hi All- We are working to reproduce this internally and updating search-tweets-ruby to handle this error more gracefully so Tweets are not lost. Apologies for the strange error.

2 Likes

Thanks for reporting this @hiperjp - we’ve been able to reproduce this intermittent issue with premium Search Tweets: full archive, and the team is investigating ways to reduce the likelihood of the cause of this error.
We are also updating and testing sample code to optimize for saving all queried data as consumed so data is not lost if an error is encountered during pagination.

4 Likes

Good news, thanks for all those examples and improvements that will come.

1 Like