You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi!
I tried logging into the librus and found a few solutions. Yours works best, but I need to do it in node.js. I tried and it gets error status 400. Everything works in this project, but maybe you'll know what the error is.
while (r == null) {
try {
r = axios.post('https://api.librus.pl/OAuth/Token', {
data: {
"username": login,
"password": password,
"librus_long_term_token": "1",
"grant_type": "password"
},
headers: headers,
statusText: 'OK',
status: 200
})
} catch (error) {
console.log(error)
}
}
(node:5460) UnhandledPromiseRejectionWarning: Error: Request failed with status code 400
at createError (C:\Users\milew\Desktop\librus\librus-api\node_modules\axios\lib\core\createError.js:16:15)
at settle (C:\Users\milew\Desktop\librus\librus-api\node_modules\axios\lib\core\settle.js:17:12)
at IncomingMessage.handleStreamEnd (C:\Users\milew\Desktop\librus\librus-api\node_modules\axios\lib\adapters\http.js:260:11)
at IncomingMessage.emit (events.js:327:22)
at endReadableNT (internal/streams/readable.js:1327:12)
at processTicksAndRejections (internal/process/task_queues.js:80:21)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:5460) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
(node:5460) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
The text was updated successfully, but these errors were encountered:
Hi!
I tried logging into the librus and found a few solutions. Yours works best, but I need to do it in node.js. I tried and it gets error status 400. Everything works in this project, but maybe you'll know what the error is.
The text was updated successfully, but these errors were encountered: