facebook - Instagram 是否会阻止来自某些 IP 的 CDN URL 请求?

标签 facebook instagram cdn instagram-api

我最近观察到对于 instagram 的某些 cdn url,GET 请求给出了 >400 响应。

https://scontent.cdninstagram.com/t51.2885-15/26184672_169643143794471_5913317750591193088_n.jpg

如果我从本地的相同代码尝试相同的 url,它就可以工作。那么,它会根据请求的 IP 地址阻止内容传送吗?

最佳答案

因为 400 错误可以解释为:

  • 无效网址

  • 错误请求

  • 请求主机名无效。

  • 由于语法格式错误,服务器无法理解该请求。

你可以尝试:

  • 清除浏览器 cookie
  • 清除您的 DNS 缓存
  • 清除浏览器缓存

然后再次尝试获取数据。


显然不是因为缓存或 cookie,

因此请注意,在 Instagram 的特定情况下,并根据 this issue 400 错误 也可能意味着:

{ "meta": { "error_type": "OAuthAccessTokenException", "code": 400, "error_message": "The access_token provided is invalid." } }

您可能还注意到,根据 the rate limit documentation当最大。达到速率限制 Instagram 将引发 429 错误,并且来自 same source ,

You may also receive responses with an HTTP response code of 400 (Bad Request) if we detect spammy behavior by a person using your app. These errors are unrelated to rate limiting.


所以我最后的建议是评估您的生产服务器是否可能被 Instagram 视为“垃圾邮件服务器”(因为请求太多)

在这种情况下,您仍然可以尝试 review your app并获取访问 token 。但请记住,如果您的应用经过审核,您仍然有此全局速率限制限制:

Global rate limits are applied inclusive of all API calls made by an app per access token over the 1-hour sliding window, regardless of the particular endpoint. Rate limits also apply to invalid or malformed requests.

Sandbox 500 /hour

Live 5000 / hour

关于facebook - Instagram 是否会阻止来自某些 IP 的 CDN URL 请求?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48149490/

相关文章:

api - 喜欢不使用 Instagram API 从私有(private)帐户加载照片

amazon-s3 - 亚马逊 S3 : when/why

requirejs - 捆绑、RequireJS 和 CDN - 它们会相互抵消吗?

facebook - 如何清除调试工具缓存数据?

Instagram 实时 API 更新很少

php - 从页面或应用程序发布到 Facebook 用户的留言墙上

android - 打开 Instagram 用户资料

html - 为什么要使用协议(protocol)相关的 URL?

iphone - 如何解决 "Unable to load persistent store at URL "错误?

ios - 无法在 Facebook 的 user_friends API 中获取用户的电子邮件 ID