Javascript 双因素身份验证不需要';行不通
所以,我想从使用TOTP的外部api请求一些东西。我已经把一切都安排好了!在我的本地主机上,一切正常,但在远程服务器(VPS)上,它崩溃并出现以下错误:Javascript 双因素身份验证不需要';行不通,javascript,node.js,Javascript,Node.js,所以,我想从使用TOTP的外部api请求一些东西。我已经把一切都安排好了!在我的本地主机上,一切正常,但在远程服务器(VPS)上,它崩溃并出现以下错误: { "status" : "success", "data" : { "error_message" : "API access enabled, but unable to verify two-factor authentication code. If you need help with this, please con
{
"status" : "success",
"data" : {
"error_message" : "API access enabled, but unable to verify two-factor authentication code. If you need help with this, please contact support@bitskins.com."
}
}
HTML:
// Secret and keys for Bitskins API
var totp = new TOTP('MPKXR23QBRQVW7SZ');
var codeFromSecret = totp.now();
var url = 'https://bitskins.com/api/v1/get_item_price/?api_key=' + bitskins.apikey + '&code=' + totp.now() + '&names=' + namesHashed + '&delimiter=!END!';
console.log("url " + url);
request(url, function (error, response, body) {
if (!error) {
var json = JSON.parse(body);
console.log("body " + body);
console.log("json " + json);
for (var a = 0; a < items.length; a++) {
itemPrices.push(json.data.prices[a].price);
}
console.log('about to emit pricesFetched @ steambot.js');
lastStep(itemPrices);
}
});
//Bitskins API的密钥和密钥
var totp=新totp('MPKXR23QBRQVW7SZ');
var codeFromSecret=totp.now();
var url='1〕https://bitskins.com/api/v1/get_item_price/?api_key=“+bitskings.apikey+”&code='+totp.now()++'&names='+namesHashed+'&delimiter=”!完!;
console.log(“url”+url);
请求(url、函数(错误、响应、正文){
如果(!错误){
var json=json.parse(body);
控制台日志(“主体”+主体);
log(“json”+json);
对于(变量a=0;a
您是否尝试过联系support@bitskins.com
?@AndrewEvt是的,到目前为止他们运气不好。但正如我所说的,部署这个应用程序肯定有一些相关的东西,因为它在本地主机上使用完全相同的代码工作得很好。