Page 1 of 2

New bot user Using the twitter bot to DM users getting 420 error

Posted: Sat May 08, 2021 3:48 pm
by Chamath
Hey ! Awesome app is just purchased yesterday. I ran the dm bot and the application shows about 250 dms over the span of 5 hours.


Now when i run it or try to send a message with the twitter app manually it fails and twitterdub shows a error 402. I can still like poeples tweets but no more dms.

I turned the bot off for 8 hours and the twitter app hoping it would go away but its still present any tips?

Re: New bot user Using the twitter bot to DM users getting 420 error

Posted: Sat May 08, 2021 4:36 pm
by martin@rootjazz
I ran the dm bot and the application shows about 250 dms over the span of 5 hours.
You spammed 250 DMs in 5 hours.

Now Twitter is blocking you from DMs, probably a temp block.

SLOW DOWN what you are doing :)

Re: New bot user Using the twitter bot to DM users getting 420 error

Posted: Sun May 09, 2021 7:02 pm
by Chamath
Hey thanks for the response the reason i have to spam it is

most of the actions have an error

09:16:36: issuccess: 403
https://twitter.com/i/api/1.1/dm/new.json
{"errors":[{"code":349,"message":"You cannot send messages to this user."}]}
09:16:36: ERROR RESP FROM TWITTER: 349 You cannot send messages to this user.

My original intention was to do do 10 dms a hour so i set max actions to 10 although most of the actions resulted in error 403/349.

So in reality i was getting 1 dm out if i was lucky and the bot would wait to repeat in the next hour hence i increased max actions.

Im not sure if this is possible but i dont understand why the bot cannot from prior that it can send a message to the user or not why are failed message sends counting towards actions.


Thank you !

Re: New bot user Using the twitter bot to DM users getting 420 error

Posted: Sun May 09, 2021 11:52 pm
by Chamath
Hence my current max dm per hour is set to 200 and that way after most of them fail atleast i get like 20-30 sucessful dms..

Unfortunately after 3-4 hours i get banned for another 24 hours anyways to fix this?

Re: New bot user Using the twitter bot to DM users getting 420 error

Posted: Mon May 10, 2021 1:57 pm
by martin@rootjazz
The issue is, you are just trying to throw out DMs all over. Twitter doesn't want you to do this. Other profiles don't want to do this. Unwanted DMs are an annoyance to everyone and generate complaints for IG, so they do all they can to stop you.

Most accounts do not accept DMs from unknown users, this has to be turned on manually, most do not.

Hence the issue.
If twitter detects you constantly trying to DM people you cannot, it doesn't take a genius to detect you are trying to send unsolicited DMs.


So what you are wanting to do, is going to be very difficult to do, as twitter really don't want you doing it.

You could try with 100s of accounts, using a SHARED ACTION, that way each account is only sending a handful

Re: New bot user Using the twitter bot to DM users getting 420 error

Posted: Tue May 11, 2021 3:44 am
by Chamath
Hello martin i understand the purpose of the 24 rate limit i understand twitter has a max 1000 per day policy im just wondering why

we get ERROR RESP FROM TWITTER: 349 You cannot send messages to this user. for most users even before the rate limit cant the bot understand which users it can send a message to and who it cants?

Re: New bot user Using the twitter bot to DM users getting 420 error

Posted: Tue May 11, 2021 3:46 am
by Chamath
just to be clear i get

ERROR RESP FROM TWITTER: 349 You cannot send messages to this user.

for most the users even before the rate limit ban occurs

Re: New bot user Using the twitter bot to DM users getting 420 error

Posted: Tue May 11, 2021 5:02 pm
by martin@rootjazz
Chamath wrote: Tue May 11, 2021 3:44 am Hello martin i understand the purpose of the 24 rate limit i understand twitter has a max 1000 per day policy im just wondering why
The limit is very much NOT 1000, ignore any limits twitter says you can do, they are way off
we get ERROR RESP FROM TWITTER: 349 You cannot send messages to this user. for most users even before the rate limit cant the bot understand which users it can send a message to and who it cants?
That is what twitter returns. You are not allowed to DM these users as you are not a follower (or they are following you - I forget the rules)



But if you want me to investigate more:

Stop / pause / delete all existing actions
Clear logs:
HELP >LOGS > DELETE
Add a new action to send some DMs
Once you get the error above, submit logs


HELP >LOGS > SUBMIT


Then let me know the logs ID (the first few numbers)

Re: New bot user Using the twitter bot to DM users getting 420 error

Posted: Wed May 12, 2021 1:58 am
by Chamath
Hey Martin thanks the log ID is 73835. I may be wrong but I personally suspect that attempting to message the people who we don't follow counts towards the rate limit so if its possible to know from before hard if we can message them or no it may help? Just my personal thoughts.


Thanks Martin for investigating cheers !

Re: New bot user Using the twitter bot to DM users getting 420 error

Posted: Wed May 12, 2021 9:33 pm
by martin@rootjazz
Chamath wrote: Wed May 12, 2021 1:58 am Hey Martin thanks the log ID is 73835. I may be wrong but I personally suspect that attempting to message the people who we don't follow counts towards the rate limit so if its possible to know from before hard if we can message them or no it may help? Just my personal thoughts.


Thanks Martin for investigating cheers !
I'll check, but AFAIK it's not possible to know if you can DM before you try