php - 您不是此客户端的沙盒用户。错误代码点火器-Instagram api

标签 php authentication codeigniter-2 instagram-api

在我的 codeigniter 项目中,我尝试使用 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

为什么会这样?任何帮助都将不胜感激

最佳答案

根据这个错误:

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

首先您需要创建沙盒用户:

第一步:

从此处“ http://instagram.com/developer ”登录您的帐户,然后单击“管理客户”创建新客户,确保客户状态为“沙盒”。

第二步:

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

第 3 步:

现在您可以在客户端详细信息框中看到客户端 ID,现在您只需要为访问 API 生成访问 token ,您可以使用此 URL:

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

关于php - 您不是此客户端的沙盒用户。错误代码点火器-Instagram api,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39632333/

相关文章:

php - 在 codeigniter 中提取日期和月份

View 的PHP MySQL查询在应该有结果时返回0结果

ios - 解析 Twitter 登录错误

php - 如何使用 Codeigniter 2.2.6 设置药物过期 6 个月前的警报消息

c# - 作为遗留 ASP.NET MVC 应用程序的一部分时,如何在 Web API 2 中对用户进行身份验证?

mysql - 无法登录 phpmyadmin 错误 #1862 - 您的密码已过期

php - Codeigniter 在插入数据时捕获错误 (Activerecord)

php - CodeIgniter 验证变量/输入不是来自表单?

php - 主机名可以注入(inject)SQL吗?

php - 使用 PHP 显示 mySQL 结果的顺序