Direct_messages/events/new keeps returning "Error: This request looks like it might be automated. To protect our users from spam and other malicious activity, we can't complete this action right now. Please try again later."


#1

I’m using the new ‘direct_messages/events/new’ endpoint to write a chatbot —

I am right now responding with a random message out of a set of 10 and after about 5 messages in as many minutes I get this response:

Error: This request looks like it might be automated. To protect our users from spam and other malicious activity, we can’t complete this action right now. Please try again later.

How is this possible? “Might be automated”? Of course – I am sending this through an API so of course it’s automated.

A chatbot will very often send the same or similar responses to user input. How do I work around this?


#2

Are you including any URLs in the messages you’re posting?


#3

Much earlier today we sent a handful of messages total with a link to the bot’s profile page. We didn’t like the UX of that so we took it out but that was several hours ago.

The messages we’ve been sending all afternoon are pure text.


#4

@andypiper I’ve tried very diligently to reproduce this issue today and wasn’t able to. I’ll keep ya posted. (Sent about 20 dms one right after another and was able to respond every time)


#5

Thanks for the update, and apologies that I didn’t come back with any other useful suggestions in the meantime!


#6

No biggie. I’ll let you know if it ever happens again. :slight_smile:


#7

Hey @andypiper – Urgent Request here:

We’re starting to get error code 226: “This request looks like it might be automated. To protect our users from spam and other malicious activity, we can’t complete this action right now. Please try again later.”

As I’ve said before we’re writing a bot that often responds with links to terms of service etc – stuff that’s the exact same thing over and over.

We’re using the events/new endpoint – why is there any scenario that I can’t send a user a DM right after they send me one? Shouldn’t the adoptive rate limiting take care of this?


#8

Yes, but there are content protections. It sounds as though the URL may have been flagged as problematic either by our systems or by users. Are you able to Tweet it? Is it only happening in Direct Messages?


#9

I can confirm in the last week at least we haven’t sent a single DM with a link over twitter through any application using our app id.

The only people we are dming (it’s a private account atm) is people I am sitting next to so I know no one is considering it spam.

Also it started working again 30 minutes later. Is there any use case where TEXT ONLY messages would be blocked?


#10

@andypiper Did some private testing of our bot with a few family and friends – still getting the request looks like it might be automated.

We’re sending back just text along with 1 of 4 or 5 gifs depending on the state the user is in at the time.

This really hurts the bot’s viability and I assume ALL bot’s viability to run on twitter’s platform. Is this a temp issue?


#11

Are these as links or as attached media?


#12

They’re attached as media objects like this

{
type: “media”,
media: {
id: 988839397909909504
}
}

Media I uploaded through the INIT/APPEND/FINALIZE sequence.


#13

Just to 100% clarify you mentioned 1 to 4 or 5 gifs - a message can only have a single gif attached. Could that be in any way related?


#14

Ah sorry I was in a rush typing.

We have a “set” of 4 or 5 gifs that we send back randomly to bot users.

Over the course of about 10 interactions, only a couple were marked as “spam” per the title of this question. The rest sent just fine (not all had gifs but most of them did)


#15

Hey @bobber205, we’re in a very similar situtation. Chatbot app that sends out DMs as response to user interaction, sometimes including a gif or a video. The same messages sometimes go through without any issues, some other times they are constantly blocked with error code 226.

Were you able to solve the issue?


#16

Yes we were.
Twitter intends for you to make bots where the majority of inputs are through the quick reply buttons. Responses to messages from these buttons aren’t applied to the spam filter or as strictly. Once we started using Quick reply buttons the issues went away.


#17

That’s good to know. Thanks for your feedback.


#18