Instagram Unable to reach callback URL

只谈情不闲聊 提交于 2019-11-27 12:08:16
uberdog

This problem has now been fixed.

If it re-appears, here is workaround that I developed dealing with similar problems with the real-time API over the past couple years.

Set your system up to use both the real-time API as well as the search API as a fallback. Ingest data coming through the real-time calls, but also periodically poll the search endpoint (either media/search or tag/search, depending on your application) for data you might have missed, ignoring IDs your system has already seen.

Your system will be much more resilient to issues with the Instagram API and also allow restarting your system periodically without missing data (since you can catch back up to real-time).

I keep track of "seen" Instagram IDs in a Redis set.

capelio

I originally posted the below answer at this question but thought I'd answer here as well since this question deals with essentially the same problem.


I've been having the same issue over the last few days. As a last ditch effort, I tried clearing all my subscriptions using the API, in case there were orphans running through the system. YMMV, but this ended up solving my "Cannot reach callback_url" problems.

The final section of the Realtime Photo Updates API docs has the details. To quickly test from the command line, give their curl example a go:

curl -X DELETE 'https://api.instagram.com/v1/subscriptions?client_secret=CLIENT-SECRET&object=all&client_id=CLIENT-ID'

If this ends up working for you, I'd recommend updating your app code to delete any existing subscriptions for a given client_id before starting a new subscription. Of course, this is only viable if you limit yourself to creating one subscription per set of credentials. If you're creating more than one subscription, you'll need to keep track of the queries that make up your active subscriptions and delete those that already exist before recreating.

I had the same issue when I wanted to register for a subscription.

Adding a AAAA record with the IPv6 of the server in the DNS of the domainname did the trick for me.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!