Can a bot "tag" (@mention) a user?

1,946 views
Skip to first unread message

john...@gmail.com

unread,
Jul 8, 2015, 1:18:32 PM7/8/15
to groupme-a...@googlegroups.com
Is it possible to have a bot (https://dev.groupme.com/bots) @mention a user in the room so that user gets a notification?

I tried using "@user" in the text parameter of the bot, but no notification was generated.

David Yeu

unread,
Jul 8, 2015, 1:21:13 PM7/8/15
to john...@gmail.com, groupme-a...@googlegroups.com
It is possible, but the "mentions" attachment is currently undocumented (simply adding @user in the text isn't sufficient).

We're planning on documenting it soon, and in the meantime, I'd recommend taking a look at existing messages to pick apart the format. 

Dave

On Wednesday, July 8, 2015, <john...@gmail.com> wrote:
Is it possible to have a bot (https://dev.groupme.com/bots) @mention a user in the room so that user gets a notification?

I tried using "@user" in the text parameter of the bot, but no notification was generated.

--
You received this message because you are subscribed to the Google Groups "GroupMe API Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to groupme-api-sup...@googlegroups.com.
To post to this group, send email to groupme-a...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/groupme-api-support/b0f62d7d-4be6-4328-b4e4-0296dade5b8e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

John Luetke

unread,
Jul 8, 2015, 2:47:03 PM7/8/15
to groupme-a...@googlegroups.com, john...@gmail.com
Thanks Dave. I got it to work when posting a message via curl from my personal account.

However, does this also apply for bot accounts using the /bots/post endpoint? The documentation makes no mention about there being an "attachments" property in that payload.

aatk...@salesmakersinc.com

unread,
Jul 8, 2015, 3:59:25 PM7/8/15
to groupme-a...@googlegroups.com
Hi John,

   I can tell you from experience that the bots can post attachments. I have posted images using bots before. However, I've never tried a mention. I am guessing that it's possible, however, since the other attachment types are available. I would suppose it would be something like this:

{
  "bot_id": "12345678901234567890",
  "text": "Text for @John",
  "attachments": [
    {
      "type": "mentions",
      "user_ids": [1234567890],
      "loci": [
        [9, 5]
      ]
    }
  ]
}

I believe the first numbers in the "loci" arrays are the start of the mention (0-indexed), and the second number is the length of the mention (starting from 1). As I said, I have not tried it, but assume it would work. :)

Kevin Ayers

unread,
Oct 9, 2015, 4:02:26 PM10/9/15
to GroupMe API Support, john...@gmail.com
Dave,

Any chance that the documentation for this ever got made?

-Kevin


On Wednesday, July 8, 2015 at 1:21:13 PM UTC-4, Dave (GroupMe) wrote:
It is possible, but the "mentions" attachment is currently undocumented (simply adding @user in the text isn't sufficient).

We're planning on documenting it soon, and in the meantime, I'd recommend taking a look at existing messages to pick apart the format. 

Dave

On Wednesday, July 8, 2015, <john...@gmail.com> wrote:
Is it possible to have a bot (https://dev.groupme.com/bots) @mention a user in the room so that user gets a notification?

I tried using "@user" in the text parameter of the bot, but no notification was generated.

--
You received this message because you are subscribed to the Google Groups "GroupMe API Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to groupme-api-support+unsub...@googlegroups.com.
To post to this group, send email to groupme-api-support@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages