This enables a single Instagram Professional account to act as both a business and an Instagram user, eliminating the need for two separate accounts when testing message previews or automation. This helps showcase messaging automation previews to your newly onboarded business users.
Since the business is messaging itself, the 24-hour response window does not apply.
You will need the following:
The feature is available for IG business users onboarded through either of these flows: Instagram API with Instagram Login and Instagram API with Facebook Login. Quick Replies are not currently supported for self messaging.
This guide assumes you have read the Instagram Platform Overview and implemented the needed components for using this API, such as a Meta login flow and a webhooks server to receive notifications.
| Instagram API with Instagram Login | Instagram API with Facebook Login | |
|---|---|---|
Access Levels |
|
|
Access Tokens |
|
|
Host URL |
|
|
Login Type | Business Login for Instagram | Facebook Login for Business |
| Permissions | Self messaging webhook
Self comment webhook
| Self messaging webhook
Self comment webhook
If the app user was granted a role on the Page connected to your app user's Instagram professional account via the Business Manager, your app will also need:
|
Webhooks | Self messaging webhook
Self comment webhook
| Self messaging webhook
Self comment webhook
|
Set up the webhook to listen for message and postback events.
When the Instagram Professional account sends a message to itself in the Instagram app, an echo webhook is triggered, including the Instagram-scoped ID of the account. is_self with a value of true indicates it is a self message.
{ "object": "instagram", "entry": [ { "id": "<YOUR_APP_USERS_IG_USER_ID>", "time": 1569262486134, "messaging": [ { "sender": { "id": "<YOUR_APP_USERS_IG_USER_ID>" }, "recipient": { "id": "<INSTAGRAM_SCOPED_ID>" }, "timestamp": 1569262485349, "message": { "mid": "<MESSAGE_ID>", "text": "<MESSAGE_TEXT>", "is_echo": true, "is_self": true } } ] } ] }Use the recipient ID received from the webhook to send a message to self on the API.
curl -X POST "https://graph.facebook.com/<latest-api-version>/<INSTAGRAM_SCOPED_ID>/messages" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer <ACCESS_TOKEN>" \ -d '{ "message": { "text": "Hello from your IG Pro account!" } }'On success, your app receives a confirmation with the message ID.
{ "id": "<MESSAGE_ID>" }When the Instagram Professional user clicks a CTA button or interacts with a message, a postback webhook is generated with "is_self": true.
{ "object": "instagram", "entry": [ { "id": "45202218377435", "time": 1743480368963, "messaging": [ { "sender": { "id": "<YOUR_APP_USERS_IG_USER_ID>" }, "recipient": { "id": "<INSTAGRAM_SCOPED_ID>" }, "timestamp": 1743480368714, "is_self": true, "postback": { "title": "Start Chatting", "payload": "DEVELOPER_DEFINED_PAYLOAD", "mid": "<MESSAGE_ID>" } } ] } ] }When the Instagram Professional user comments on their own post, a comments webhook is generated with self_ig_scoped_id as the IGSID of their professional account.
{ "object": "instagram", "entry": [ { "id": "<YOUR_APP_USERS_INSTAGRAM_ACCOUNT_ID>", "time": "<TIME_META_SENT_THIS_NOTIFICATION>", "changes": [ { "field": "comments", "value": { "from": { "id": "<YOUR_APP_USERS_INSTAGRAM_ACCOUNT_ID>", "username": "<INSTAGRAM_USER_USERNAME>", "self_ig_scoped_id": "<YOUR_APP_USERS_INSTAGRAM_SCOPED_ID>" }, "id": "<COMMENT_ID>", "text": "<COMMENT_TEXT>", "media": { "id": "<MEDIA_ID>", "media_product_type": "<MEDIA_PRODUCT_TYPE>" } } } ] } ] }