Instagram Unable to reach callback URL

北慕城南 提交于 2019-12-13 13:24:56

问题


I'm having weird problem that instagram won't allow me to subscribe to more tags. I subscribed yesterday to 3 tags without any problem, I tried today with new tag and no effect. Does somebody else have same problems?

I keep getting APISubscriptionError code 400 Unable to reach callback URL, but that URL is globaly accessible, even instagram is calling it every 5 min for tags i added yesterday.

Any ideas?


回答1:


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.




回答2:


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.




回答3:


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.



来源:https://stackoverflow.com/questions/22983969/instagram-api-unable-to-reach-callback-url

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