简体   繁体   English

Node.js请求错误状态码403

[英]Node.js request error statuscode 403

I don't know what I'm doing wrong. 我不知道我在做什么错。 I keep getting the statuscode 403 when I run this code. 运行此代码时,我一直收到状态代码403。 I'm trying to make authentication with instagram. 我正在尝试使用instagram进行身份验证。

var request = require("request");

var options = {
    url:'https://www.instagram.com/accounts/login/',
    auth: {
       username:'username',
       password:'password'
    }
};
request.post(options, function(err, res, body) {
    console.log(res.statusCode);
});

Go to Manage clients under instagram/developer. 转到在instagram / developer下管理客户。 Then click edit under your app and uncheck Disable Implicit OAuth. 然后,在您的应用下单击“编辑”,然后取消选中“禁用隐式OAuth”。 It will now work as intended. 现在它将按预期工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM