2016-09-22 37 views
3

在我codeigniter项目我想在使用Instagram API日志。你不是这个客户的沙箱用户。错误笨,Instagram的API

This 是我使用的库。

但去到登录页面时,它显示错误

{"code": 403, "error_type": "OAuthForbiddenException", "error_message": "You are not a sandbox user of this client"}

样品网址是

https://www.instagram.com/oauth/authorize/?client_id=[client ID]&redirect_uri=[your url]&response_type=code 

为什么它是这样工作?任何帮助可以理解

+0

首先生成访问令牌:遵循这个:http://jelled.com/instagram/access-token – devpro

+0

任何成功阿伦? – devpro

回答

5

按照这个错误:

{"code": 403, "error_type": "OAuthForbiddenException", "error_message": "You are not a sandbox user of this client"}

所有你需要创建沙盒用户首先:

第一步:

登录您的账户从这里“http://instagram.com/developer”,然后点击管理Cli创建新客户端,确保客户端的状态是沙盒。

第二步:

填写所有必填字段,并设置OAuth redirect_uri字段为 “http://localhost” 不使用引号。还选中Disable implicit OAuth

第3步:

现在你可以看到在客户明细框的客户端id,现在你只需要生成访问令牌访问API,你可以使用这个网址:

https://instagram.com/oauth/authorize/?client_id=[CLIENT_ID_HERE]&redirect_uri=http://localhost&response_type=token 

从这里你可以查看客户端的状态: enter image description here

参考:http://jelled.com/instagram/access-token