members/add and members/results

397 views
Skip to first unread message

Joel Anderson

unread,
Mar 27, 2016, 12:03:37 PM3/27/16
to GroupMe API Support
I'm using the v3 API to add new members to a group. Adding new members works just fine.

Right after calling members/add, I query members/results but the members list is always empty. I'm expecting the members list to contain the members that were added, including the correlation guid's I supplied when I added the members.

-- members/add -----------------------
REQUEST:
curl -X POST -H "Content-Type: application/json" -d '{"members":[{"nickname":"foo","email":"f...@example.com","guid":"f59ae801-0528-40d2-aed2-a89ca3a9de7c"},{"nickname":"bar","email":"b...@example.com","guid":"a03e69e6-4f57-4e8e-8620-6e364692d61a"}]}' https://api.groupme.com/v3/groups/1234/members/add?token=mytoken

RESPONSE:
{"meta":{"code":202},"response":{"results_id":"9cf1c890-d65f-0133-0808-22000b0206d6"}}

At this point, the new members have received their invitations and the invitation message appears in the group.

-- members/results -------------------
REQUEST:

(Notice I'm using the guid I get from the members/add to construct the members/results request.)

RESPONSE:
{"meta":{"code":200},"response":{"members":[]}}
------------------------------------------------

Why is the members list always empty?

Jake Bathman

unread,
Mar 27, 2016, 12:29:53 PM3/27/16
to Joel Anderson, GroupMe API Support
Weird, that's the same process I follow and haven't been having issues (but I haven't tried it recently). 

Are you requesting the /results endpoint within one hour of adding the user?

--
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/7095f17c-1103-47af-8c06-ec05bfe2753c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Joel Anderson

unread,
Mar 27, 2016, 1:14:59 PM3/27/16
to GroupMe API Support, sonofs...@gmail.com
Thanks for the response.

Yes, I'm hitting it within a few seconds, just long enough for me to grab the guid then craft and execute the next curl statement.

I also tried it again after more than an hour passed and got the 404 response like the docs mentioned.

Stumped.

To unsubscribe from this group and stop receiving emails from it, send an email to groupme-api-support+unsub...@googlegroups.com.

Joel Anderson

unread,
Mar 31, 2016, 9:49:41 AM3/31/16
to GroupMe API Support
For anyone following along, I think I found the problem.


-- The problem, restated --

After issuing a successful members/add call, the response to the subsequent members/results call contained an empty list instead of the list of newly added members as expected.

-- Suspected cause --

I was adding new members to a group, but these members were already GroupMe users (they belonged to other groups, etc.). They were new "members", but not new "users" and I think that's why they don't appear in members/results response. Perhaps that is what is meant by these words from the API docs:

    "Failed memberships and invites are omitted."

When the new members are also new users, they appear in the response.

-- In conclusion --

I guess it is important to distinguish between "new user" and "new member". New users are those who have never registered with GroupMe; new members are existing GroupMe users who have been invited to join a group. New users can be created as a by-product of inviting them to a group using the API. In this scenario, the members/results response will contain the newly created user-members, otherwise the list will be blank.



Thanks for everyone's help!



On Sunday, March 27, 2016 at 11:03:37 AM UTC-5, Joel Anderson wrote:
I'm using the v3 API to add new members to a group. Adding new members works just fine.

Right after calling members/add, I query members/results but the members list is always empty. I'm expecting the members list to contain the members that were added, including the correlation guid's I supplied when I added the members.

-- members/add -----------------------
REQUEST:
curl -X POST -H "Content-Type: application/json" -d '{"members":[{"nickname":"foo","email":"f...@example.com","guid":"f59ae801-0528-40d2-aed2-a89ca3a9de7c"},{"nickname":"bar","email":"bar@example.com","guid":"a03e69e6-4f57-4e8e-8620-6e364692d61a"}]}' https://api.groupme.com/v3/groups/1234/members/add?token=mytoken

Pres Holcomb

unread,
Oct 21, 2016, 12:09:49 PM10/21/16
to GroupMe API Support
This is good information.  Here's my follow up question.

I have a Php application that adds users to a group based on a pre-determined list of our system users.
When I do an ADD call, they are all added to the group, BUT I need to get back (through what I assume is the RESULTS call) their Group ID so that I can store that in case they get removed in our system at a later time and therefore need to be released from the group by their Group ID number.

If the RESULTS call only returns NEW users, how do I get back the IDs from added members of a group that are ALREADY in the GroupMe system??



On Sunday, March 27, 2016 at 11:03:37 AM UTC-5, Joel Anderson wrote:

Jake Bathman

unread,
Oct 22, 2016, 12:32:04 AM10/22/16
to GroupMe API Support, Pres Holcomb
It's not documented well, but the return of GET /groups/{groupId} includes a list of members. For each member element, there's user_id and id values, the latter of which you'll use to remove the user.

Jake

--
Jake Bathman
twitter.com/jakebathman
--
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.

Kovy Jacob

unread,
Sep 8, 2023, 5:42:38 PM9/8/23
to GroupMe API Support
What is source-guid? I just put GUID or GUID-2 in my API requests, I didn't realize it needs an actual value.
Reply all
Reply to author
Forward
0 new messages