Image Gallery¶
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¶
List a Group or DM conversation's previous messages that contain images or files stored in the Gallery.
The response is paginated (sort of), with a default of 100 images per page. Specifying a before
timestamp allows you to fetch beyond the first page of results.
HTTP Request | |
---|---|
Parameters
- acceptFiles
boolean - A flag to tell the image service your client is capable of receiving non-image files. Setting this value to 0
or omitting it entirely will NOT omit messages with file attachments in the response; these messages will still be included, but the text property will be overwritten with Please upgrade to download this file.
The file attachment will still be fully intact, however. In practice this means that if you care about the text in the message with an attachment, you should set acceptFiles=1
.
-
limit
integer - Defines page size. Defaults to 100.
-
before
string - A timestamp in ISO 8601 format denoting the latest image timestamp to include in the response. This is used for pagination: the server will return images older than this timestamp. If omitted, it fetches the most recent images.
- after
string - A timestamp in ISO 8601 format denoting the oldest image timestamp to include in the response. This is used for pagination: the server will return images newer than this timestamp. Can be used with or without the before
parameter.