0

Long story short, I am creating a chrome extension for GroupMe that notifies you if a message is posted in a group. The message says who posted it, what they posted, and then allows you to kick or direct message them if you desire.

Everything is working besides being able to kick the person who chatted the message, because that requires the user's membership_id and not their user_id, as said in their API: https://dev.groupme.com/docs/v3#members_remove

The only reason direct messages worked is because it required their user_id, which can be retrieved easily (https://dev.groupme.com/docs/v3#groups_show).

The problem with the above API is that it does not give the regular id of the user. I am having trouble finding a good way to get their id so that they can be removed from the group. Any ideas?

Jeremy
  • 1
  • 85
  • 340
  • 366

1 Answers1

1

This may be a late response but I was struggling with the same issue...

The membership id is documented, just not explicitly. In the Members > Update section found here: https://dev.groupme.com/docs/v3#members_update.

To update a member's information. the membership_id must be provided. We can see here that the id feild is equivalant to the membership_id.

{
  "id": "MEMBERSHIP ID",
  "user_id": "USER ID",
  "nickname": "NEW NICKNAME",
  "muted": false,
  "image_url": "AVATAR URL",
  "autokicked": false,
  "app_installed": true
}

So to remove a user all we need is that id. To do so we can just get all members of a group like so:

GET /groups/:id

the results of that request will contain a list of all members and contains each members id which is their membership id.

For more info see: https://dev.groupme.com/docs/v3#groups_show