最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

How to get real account id from Instagram message-scoped id - Stack Overflow

programmeradmin0浏览0评论

I have an Instagram app (in live-mode) that receives messaging webhooks when someone messages an Instagram account that has authorized my app. However, the recipient ID (which would be the Instagram account using my app) is scoped to the message and is NOT the actual account ID that is returned during the OAuth process when the user authorizes my app. I know that I can get the user's "real" id by querying the /{id} endpoint with the account access token, however, how do I find the account to use in the first place using the recipient id? The message-scoped ID seems to be the Page ID of the connected Facebook Page (this is a professional account on IG connected to an FB biz page), however I cannot access any of the fb graph endpoints since my access token came from the Instagram login flow.

Does anyone know of a way to connect the recipient id received in a message webhook to the actual IG account it belongs to?

For example:

  • User auth's app through IG and app receives account ID 1234
  • An IG user messages the account and a webhook is received by the app
  • The webhook event has a recipient ID of 5678, which is a message-scoped id for 1234

Are there any endpoints that let me take the 5678 id and associate it to the 1234 account id? Thank you!

发布评论

评论列表(0)

  1. 暂无评论