Calendar Events¶
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 events¶
List all the upcoming events for the group
HTTP Request | |
---|---|
Parameters
-
end_at (required)
string - an ISO 8601-formatted string which represents the date before which no events will be listed. IMO it makes more sense to call this "start_at", but that's none of my business.
-
limit (required)
integer - the number of results to pull. GroupMe's default is 20, not sure what the limit is.
Show a Specific Event¶
List details on a specific event given its ID
HTTP Request | |
---|---|
Parameters
-
event_id
String - The ID of the event you want to fetch
Create an event¶
Creates a calendar event.
Parameters
-
name (required)
string - The name of the event.
-
start_at (required)
string - A datetime in ISO 8601 format. Represents the date and time that the event starts.
-
end_at (required)
string - A datetime in ISO 8601 format. Represents the date and time that the event ends.
-
timezone (required)
string - An indication of what timezone the event takes place in. Seems to be based on the TZ Database names.
-
description
string - The text you want to use to describe the event.
-
is_all_day
boolean - If true, will not specify a time for clients.
-
image_url
string - An image URL which will be attached to the event if provided. This image MUST be uploaded to GroupMe's Image Service first.
-
location
object - Can contain address, name (required), lat, and lng fields. Address and name are both strings, while lat and lng must be numbers expressed as strings (as shown in the example) which represent the latitude and longitude, respectively, of the location.
-
reminders
array - An array of integers, which represent automatic reminders from GroupMe. The number is the number of seconds between the reminder and the start of the event - for example, if one of the numbers is 300, that represents sending a reminder 5 minutes before the event starts. Only two reminders are permitted, and only certain values are permitted: 0, 300, 900, 1800, 3600, 7200, 86400, 172800, and 604800.
Edit/Update an event¶
Edit or update an event. In order to do this, you must be the original creator of the event. Note that this is very similar to the Create request. You only need to provide whatever parameters you wish to change about the original event, but start_at, end_at, timezone, and is_all_day MUST be provided together if any of them are included!
Parameters
-
event_id (required)
string - the ID of the event to edit. Please note that this is supplied as part of the URL query string, rather than part of the request body.
-
name
string - The name of the event.
-
start_at
string - A datetime in ISO 8601 format. Represents the date and time that the event starts. If this is included, you MUST also include end_at, timezone, and is_all_day!
-
end_at
string - A datetime in ISO 8601 format. Represents the date and time that the event ends. If this is included, you MUST also include start_at, timezone, and is_all_day!
-
timezone
string - An indication of what timezone the event takes place in. Seems to be based on the TZ Database names. If this is included, you MUST also include end_at, start_at, and is_all_day!
-
description
string - The text you want to use to describe the event.
-
is_all_day
boolean - If true, will not specify a time for clients. If this is included, you MUST also include end_at, timezone, and start_at!
-
image_url
string - An image URL which will be attached to the event if provided. This image MUST be processed by GroupMe's Image Service before it can be used.
-
location
object - Can contain address, name (required), lat, and lng fields. Address and name are both strings, while lat and lng must be numbers expressed as strings (as shown in the example).
-
reminders
array - An array of integers, which represent automatic reminders from GroupMe. The number is the number of seconds between the reminder and the start of the event - for example, if one of the numbers is 300, that represents sending a reminder 5 minutes before the event starts. Only two reminders are permitted, and only certain values are permitted: 0, 300, 900, 1800, 3600, 7200, 86400, 172800, and 604800.
HTTP Response | |
---|---|
Delete/Cancel an event¶
Cancel an upcoming event. In order to do this, you much be the creator of the event.
HTTP Request | |
---|---|
Parameters
-
event_id (required)
string - The ID of the event to delete.
HTTP Response | |
---|---|
Mark going/not going¶
Marks you as going or not going to an event.
HTTP Request | |
---|---|
Parameters
-
event_id (required)
string - The ID of the event to respond to.
-
going (required)
boolean - If true, this request will mark you as going. If false, this request will mark you as not going.
HTTP Response | |
---|---|
Un-mark going/not going¶
Marks the user as neither going nor not going; in other words, marks the user as "unsure" or "pending".
HTTP Request | |
---|---|
Parameters
-
event_id (required)
string - the ID of the event you're responding to