(node:1436) UnhandledPromiseRejectionWarning: Error: Status code error 403 - Response:

{"appId":"PX16uD0kOF","jsClientSrc":"/16uD0kOF/init.js","firstPartyEnabled":true,"vid":"","uuid":"645cdd54-857b-11ec-9f49-4c4d7149756f","hostUrl":"/16uD0kOF/xhr","blockScript":"/16uD0kOF/captcha/captcha.js?a=c&u=645cdd54-857b-11ec-9f49-4c4d7149756f&v=&m=0"}at Object.module.exports [as submitCredentials] (C:\xampp\htdocs\stockx\node_modules\stockx-api\src\api\login\submitcredentials.js:41:43)

const StockXAPI = require('stockx-api');const stockX = new StockXAPI();console.log('Logging in...');stockX.login({user: 'accountemailhere', password: 'accountpassword'}).then(() => console.log('Logged in successfully!'));

Api link:https://github.com/matthew1232/stockx-api

1

Best Answer


this is the cloudflare waf that is blocking your requests because they are suspect and made by a bot.You can't fix that since this is the only stockx api available.