Instagram API:提供的access_token无效 [英] Instagram API: The access_token provided is invalid

查看:129
本文介绍了Instagram API:提供的access_token无效的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经注册了沙箱用户.现在,我正在尝试使用它,但是我收到提供的access_token无效"的信息. 样品要求:

I have registred a sandbox user. Now I am trying to use it, but I recieve "The access_token provided is invalid". Sample request:

https://api.instagram. com/v1/users/searchq = abc& count = 2& client_id = 7b67cff1a7ab462881298434c08b5ab8

它在实时模式下工作,但是我找不到为什么它不能在沙盒中工作.

It was working in live mode, but I can't find why it isn't working in sandbox.

推荐答案

您需要检查要求

You need to check for requirements Scope for API you are using and if it's need and Authentications "Valid access Token". where also had some changes.

  • 基本-读取用户的个人资料信息和媒体
  • public_content代表用户读取任何公共资料信息和媒体
  • follower_list阅读关注者和关注用户的列表
  • 评论-代表用户发布和删除评论
  • 关系-代表用户关注和取消关注帐户
  • 喜欢-代表用户喜欢和不喜欢媒体

并查看您的应用的**沙盒API行为,而不是寿命:**

API行为

处于沙盒模式时,API的行为与应用程序处于活动状态时的行为相同,但具有以下限制:

The behavior of the API when you are in sandbox mode is the same as when your app is live, but comes with the following restrictions:

数据仅限沙盒用户和每个沙盒用户的20种最新媒体 降低API速率限制 第一点很重要,它意味着API的行为就像Instagram上唯一的用户是您的沙箱用户,而发布过的唯一媒体是这些用户中每个用户的最后20个.

Data is restricted to sandbox users and the 20 most recent media from each sandbox user Reduced API rate limits The first point is important and it means that the API behaves as if the only users on Instagram were your sandbox users, and the only media ever posted were the last 20 for each of these users.

例如,如果您查询/users/{user-id}/端点,而{user-id}是一个沙箱用户,那么您将获得正常的API响应;但是如果{user-id}不是沙盒用户,则会收到APINotFound错误.

For example, if you query the /users/{user-id}/ endpoint and the {user-id} is a sandbox user, then you will get the normal API response; but if the {user-id} is not a sandbox user, you will get a APINotFound error.

祝你好运

这篇关于Instagram API:提供的access_token无效的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆