This document explains how to manage Instagram events using the Instagram API with Facebook Login, covering creation, modification and retrieval of existing events.
In this document we use "Instagram User" and "Instagram Account" interchangeable; both represent your app user's Instagram professional account.
You'll need the following:
instagram_basic
permissioninstagram_manage_upcoming_events
permissionTo create a new event, send a POST
request to the /<IG_USER_ID>/upcoming_events
endpoint, where <IG_USER_ID>
is the ID for your app user's Instagram professional account, including the following parameters:
title
start_time
notification_subtypes
(optional)end_time
(optional)notification_target_time
(optional)Formatted for readability. Make sure to replace placeholders with your own values.
curl -X POST "https://graph.facebook.com/v23.0
/<IG_USER_ID>/upcoming_events" \
-F 'title="Season Premiere"' \
-F 'start_time="2024-06-30T19:00:00+0000"' \
-F 'notification_subtypes=["BEFORE_EVENT_1DAY", "BEFORE_EVENT_15MIN", "EVENT_START"]' \
-F 'access_token=<ACCESS_TOKEN>'
On success, your app receives a JSON response containing the new event's ID.
{ "id": "<EVENT_ID>" }
Name | Description | ||
---|---|---|---|
ISO string | Optional. The event's end time. | ||
string | Optional. A string value specifying the part of the event relative to which notifications will be sent. Supported values are If not set in the request, defaults to Additionally, when set to | ||
array of strings | Optional.
A comma-separated list of three values that describe when notifications will be sent to event subscribers relative to the event’s If set without specifying
Order does not matter. If | ||
ISO string | Required. The event's start time. | ||
string | Required. The event's title. |
To retrieve details of an existing event, send a GET
request to the /<EVENT_ID>
endpoint.
Formatted for readability. Make sure to replace placeholders with your own values.
curl -X GET "https://graph.facebook.com/v23.0
/<EVENT_ID>?access_token=<ACCESS_TOKEN>"
On success, your app receives a JSON response containing the ID, title , and start time for the event.
{ "id": "<EVENT_ID>" "title":"Updated Season Premier", "start_time":"2024-05-11T16:00:00+0000" }
To update the details of an existing event, send a POST
request to the /<EVENT_ID>
and include one or more of the following parameters that you want to update:
title
start_time
notification_subtypes
(optional)end_time
(optional)Formatted for readability. Make sure to replace placeholders with your own values.
curl -X POST "https://graph.facebook.com/v23.0
/<EVENT_ID>" \
-F 'title="Season Premiere"' \
-F 'start_time="2024-06-30T19:00:00+0000"' \
-F 'notification_subtypes=["BEFORE_EVENT_1DAY", "BEFORE_EVENT_15MIN", "EVENT_START"]' \
-F 'access_token=<ACCESS_TOKEN>'
On success, your app receives a JSON response containing the ID for the event.
{ "id": "<EVENT_ID>" }
To retrieve a list of all upcoming events, send a GET
request to the /<IG_USER_ID>/upcoming_events
.
Formatted for readability. Make sure to replace placeholders with your own values.
curl -X GET "https://graph.facebook.com/v23.0
/<IG_USER_ID>/upcoming_events?access_token=<ACCESS_TOKEN>"
On success, your app receives a JSON response containing a list of all upcoming events with the ID, title, and start time for each.
{ "data": [ { "id": "<EVENT_ID_1>," "title":"<EVENT_TITLE_1>", "start_time":"2024-04-11T16:00:00+0000" }, { "id": "<EVENT_ID_2>," "title":"<EVENT_TITLE_2>", "start_time":"2024-04-18T16:00:00+0000" }, { "id": "<EVENT_ID_3>," "title":"<EVENT_TITLE_3>", "start_time":"2024-04-25T16:00:00+0000" }, ] }