Navigation

    SmartAPI Forum
    • Register
    • Login
    • Search
    • Categories
    • Popular
    • Groups
    • FAQs
    • API Docs

    Got error while requesting accessToken

    Test
    0
    1
    0
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S
      sagarmonapara last edited by

      Hello Devs!
      I am using nodejs SDK to connect with angel one smart API. I did code by reading your document but I am getting the below error while requesting accessToken.

      ERROR:
      TypeError: Cannot read properties of undefined (reading 'status')
      at /Volume-B/Angel smartAPI/alog-trad-app/node_modules/smartapi-javascript/lib/smartapi-connect.js:99:28
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
      /Volume-B/Angel smartAPI/alog-trad-app/node_modules/smartapi-javascript/lib/smartapi-connect.js:99
      if (error.response.status) {

      CODE, using which I am trying:
      let smart_api = new SmartAPI({
      api_key: API_KEY
      });

      smart_api.generateSession(CLIENT_CODE,PASSWORD).then((res)=>{
      console.log('sessionRes:',res);
      }).catch(console.log);

      Please guide me what should I do?

      1 Reply Last reply Reply Quote 0
      • First post
        Last post