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

You are not a sandbox user of this client. Error Codeigniter-Instagram api

在我的 codeigniter 项目中,我尝试使用 Instagram API 登录。

This 是我正在使用的库。

但是进入登录页面时,显示错误

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

样本url是

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,您可以使用此 URL:

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

您可以从这里查看客户端的状态:

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

在这种错误情况下:

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

您需要将该 Instagram 用户添加到 Sandbox Users:

第一步:

https://www.instagram.com/developer/clients/manage/

Manage

Sandbox

第二步:

键入出现该错误的用户的 Instagram ID 添加并按 Save。 您将在您添加的用户前面看到pending

第 3 步:

现在您需要接受邀请。 在 https://www.instagram.com.

上登录该 Instagram 帐户

转到https://www.instagram.com/developer/clients/sandbox_invites/

Accept

完成!现在应该可以了。

除了已经提供的答案:

检查您在 Instagram 上登录的帐户

您无法登录帐户 A 并为帐户 B.

请求令牌

这是一个简单的答案,但我只花了 15 分钟来解决这个问题,因为我在不同的 Chrome windows.

下登录了不同的帐户