Users and Contacts¶
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 User¶
Returns some basic profile information, like the name, bio, and groups you share with another user.
Important
This request is relative to https://v2.groupme.com/
, not https://api.groupme.com/v3/
.
HTTP Request | |
---|---|
Parameters
-
include_shared_groups
boolean - if
false
, theshared_groups
property contained in the response will benull
.
Index Blocks¶
A list of contacts you have blocked. These people cannot DM you or add you to groups.
HTTP Request | |
---|---|
Parameters
-
user (required)
string - Your user ID
HTTP Response | |
---|---|
Block Between?¶
Asks if a block exists between you and another user id
HTTP Request | |
---|---|
Parameters
-
user (required)
string - Your user ID
-
otherUser (required)
string - The other user's ID
```json linenums="1" title="HTTP Response"Status: 200 OK { "between": true }
***
## Block
Creates a block between you and the contact
```json linenums="1" title="HTTP Request"
POST /blocks?user=<user>&otherUser=<otherUser>
Parameters
-
user (required)
string - your user id.
-
otherUser (required)
string — user id of person you want to block.
```json linenums="1" title="HTTP Response"Status: 201 Created { "block": { "user_id": "1234567890", "blocked_user_id": "1234567890", "created_at": 1302623328 } }
***
## Unblock
Removes block between you and other user
```json linenums="1" title="HTTP Request"
DELETE /blocks?user=<user>&otherUser=<otherUser>
Parameters
-
user (required)
string - your user id.
-
otherUser (required)
string — user id of person you want to block.
```json linenums="1" title="HTTP Response"Status: 200 OK
***
## Unblock (Alternative method)
Removes block between you and other user
```json linenums="1" title="HTTP Request"
POST /blocks/delete?user=<user>&otherUser=<otherUser>
Parameters
-
user (required)
string - your user id.
-
otherUser (required)
string — user id of person you want to block.
```json linenums="1" title="HTTP Response"Status: 200 OK
## Index Relationships
This endpoint lists all the users in your GroupMe contact book. However, the server—not the client—decides how many results to return in each response. To retrieve the full list of contacts, you’ll need to make repeated requests using the since parameter.
Each response is ordered by creation time. To get the next page of results:
1. Take the created_at_iso8601 timestamp from the last contact in the response.
2. Use that timestamp as the `since` parameter in your next request.
Repeat this process until the response contains an empty list, which means you've reached the end of the contact list.
!!! important
This request is relative to `https://api.groupme.com/v4/`, not `https://api.groupme.com/v3/`.
```json linenums="1" title="HTTP Request"
GET https://api.groupme.com/v4/relationships
Parameters
-
include_blocked
boolean - if
false
, users that returnblocked: true
will be omitted from the response. -
since
string - an ISO 8601 timestamp, marking the last contact you've received
Delete Relationship¶
Delete a relationship from your contact book
Important
This request is relative to https://api.groupme.com/v4/
, not https://api.groupme.com/v3/
.
HTTP Request | |
---|---|
HTTP Response | |
---|---|