Members¶
Unless otherwise stated, endpoints are relative to https://api.groupme.com/v3/ and must include the token of the user making the call - so, for example, if an endpoint is GET /groups
, the request you make should be using the URL https://api.groupme.com/v3/groups?token=aSDFghJkl
, where aSDFghJkl
is replaced with the user's token.
URLs which include a variable, such as GET /groups/:id
, have their variables marked with a colon. So a request to that endpoint would look like https://api.groupme.com/v3/groups/1234567?token=aSDFghJkl
, where 1234567
is replaced with the group's ID, and aSDFghJkl
is replaced with the user's token.
Finally, all responses are wrapped in a response envelope of the following form:
If the request succeeds, meta.errors
will be null, and if the request fails, response
will be null.
Index Members¶
Fetch a group's current or former member list.
This call is limited to admins and owners in the group. Any other caller will receive a 401 Unauthorized
response.
HTTP Request | |
---|---|
Parameters
-
filter (required)
string - to fetch either
active
(current memberships) orinactive
(former memberships).
Add Members¶
Add members to a group.
Multiple members can be added in a single request, and results are fetched with a separate call (since memberships are processed asynchronously). The response includes a results_id that's used in the results request.
In order to correlate request params with resulting memberships, GUIDs can be added to the members parameters. These GUIDs will be reflected in the membership JSON objects.
HTTP Request | |
---|---|
Parameters * members
* *array* - nickname is required. You must use one of the following identifiers: user_id, phone_number, or email. The array should contain objects with the following properties:
* *nickname* (required)
string - The name the user will use
* *user_id*
string - The user ID of the user to add
* *phone_number*
string - The phone number of the user to add
* *email*
string - The phone number of the user to add
* *guid*
string - If used, the GUID of the associated "results" object will match the value given
Fetch "Add" Results¶
Get the membership results from an add call.
Successfully created memberships will be returned, including any GUIDs that were sent up in the add request. If GUIDs were absent, they are filled in automatically. Failed memberships and invites are omitted.
Keep in mind that results are temporary -- they will only be available for 1 hour after the add request.
HTTP Request | |
---|---|
Parameters
-
results_id (required)
string - This is the guid that's returned from an add request.
Remove Member¶
Remove a member (or yourself) from a group.
Note: The creator of the group cannot be removed or exit.
HTTP Request | |
---|---|
Parameters
-
membership_id (required)
string - Please note that this isn't the same as the user ID. In the members key in the group JSON, this is the id value, not the user_id.
HTTP Response | |
---|---|
Index Pending Join Requests¶
Some groups have "Request to join" enabled, and thus require their applications approved by an admin.
This request can be sent by any member of the group, not just admins. However, in order to approve or deny requests, you must have permission to manage the group.
HTTP Request | |
---|---|
Accept/Deny a Pending Join Request¶
This request is exclusive to members with permission to manage the group, non Admin/Owners will receive a 401: Unauthorized response.
Parameters-
membership_id (required)
string - The group specific ID of the membership you wish to handle. Please note that this isn't the same as the user ID. In the members key in the group JSON, this is the id value, not the user_id.
-
approval (required)
boolean -
true
to approve,false
to deny.
Note: if you deny the membership, state
will be "denied" instead of "active"
Ban Member (v2)¶
Prevent a member from rejoining a group after they leave.
Current members of the group cannot be banned from rejoining as they have not left.
Note: This request is relative to https://v2.groupme.com
, NOT https://api.groupme.com/v3
.
HTTP Request | |
---|---|
Parameters
-
membership_id (required)
string - Please note that this isn't the same as the user ID. In the members key in the group JSON, this is the id value, not the user_id.
HTTP Response | |
---|---|
Change nickname¶
Update your nickname in a group. The nickname must be between 1 and 50 characters.
HTTP Request | |
---|---|