1
我正在学习API并正在使用Instagram的API进行测试。Instagram的APINotAllowed错误
目前,我有一个沙盒模式的客户端和一个具有public_content范围的访问令牌。我创建了另一个设置为私人个人资料的instagram帐户。这个新帐户是客户端的沙箱用户。
这是我的代码。
import requests
import json
parameters = {'ACCESS_TOKEN':'4831128049.31d6072.13cfcadf494344cba7d7f47f18f8ba97'} #modified fake access for question sake
response = requests.get('https://api.instagram.com/v1/{i-put-the-user-id-here}/self/media/recent?access_token='+parameters['ACCESS_TOKEN'])
json_data = response.json()
print(response.status_code)
print(json_data)
但我不断收到此。
{
'meta':{
'code':400,
'error_type':'APINotAllowedError',
'error_message':'you cannot view this resource'
}
}
编辑1:但是,如果用户访问令牌的拥有者工作的,那就是它完美对我自己的帐户,但不为其他专用配置文件,这也是一个沙盒帐户。
我做错了什么? 如果这是不可能的,那么其他第三方应用程序如何做呢?像Flume for Mac?
offtopic here,但想知道如果你有任何信息,如果目前的API将被弃用,并用Graph新的替换? – Alin