I'm facing an issue with the Instagram Graph API where the ID in the webhook data doesn't match the ID returned from the /me endpoint.

I use the /me endpoint to get the Instagram Business ID:

https://graph.instagram.com/me?fields=id,username

This returns 12345 and my username.

When an Instagram user sends a message, the webhook data contains a different recipient ID (67890), which doesn't match the stored ID (12345).

Example Webhook:

{   "object": "instagram",   "entry": [     {       "time": 67890,       "id": "12345400796128930",       "messaging": [         {           "sender": { "id": "981149143905198" },           "recipient": { "id": "67890" },           "timestamp": 1735516966810,           "message": {             "mid": "1bfkwjeb1jk43b1jk43bkj",             "text": "hello hello"           }         }       ]     }   ] } 

The recipient ID (67890) corresponds to the user who authorized my app but is not the same as the ID from the /me endpoint.

Is Instagram sending an ID that can't be looked up via the access token? This ID (67890) is persistent across multiple webhook requests.

Tag:facebook-graph-api, instagram, instagram-api, instagram-graph-api

Add a new comment.