OpenApi-5p / 5paisa-js

Official NodeJS SDK for 5paisa APIs natively written in .NET
11 stars 16 forks source link

Getting 400 Bad Request on login #27

Open rahulnlb1 opened 2 years ago

rahulnlb1 commented 2 years ago

I am using the below code to login using the credentials, but getting 400 Bad Request.

const conf = {
   * "appSource": "",
   * "appName": "",
   * "userId": "",
   * "password": "",
   * "userKey": "",
   * "encryptionKey": ""
   * }
   * const { FivePaisaClient} = require("5paisajs")
   *
   * var client = new FivePaisaClient(conf)
   *
   * // This client object can be used to login multiple users.
   * client.login("random_email@xyz.com", "password", "YYYYMMDD").then((response) => {
   *     console.log(response);
   * }).catch((err) =>{
   *     // Oh no :/
   *     console.log(err)
   * })

Please help me resolve the issue.

rahulnlb1 commented 2 years ago

Error log:

Error: Request failed with status code 400
    at createError (/Users/rahuljain/PersonalProject/trading-5paisa/node_modules/axios/lib/core/createError.js:16:15)
    at settle (/Users/rahuljain/PersonalProject/trading-5paisa/node_modules/axios/lib/core/settle.js:17:12)
    at /Users/rahuljain/PersonalProject/trading-5paisa/node_modules/axios-cookiejar-support/lib/interceptors/response.js:83:25
    at new Promise (<anonymous>)
    at responseInterceptor (/Users/rahuljain/PersonalProject/trading-5paisa/node_modules/axios-cookiejar-support/lib/interceptors/response.js:82:9)
    at /Users/rahuljain/PersonalProject/trading-5paisa/node_modules/axios-cookiejar-support/lib/index.js:130:67
    at processTicksAndRejections (node:internal/process/task_queues:96:5) {
sbanerjee302 commented 1 year ago

@ba11b0y @5paisa is this repository being monitored or maintained in any way ? There seems to be no updates to any of the issues.

vaishalijasoliya commented 1 year ago

@5paisa i m facing same issue anyone can help me ? @ba11b0y @rahulnlb1 @sbanerjee302