Navigation

    SmartAPI Forum
    • Register
    • Login
    • Search
    • Categories
    • Popular
    • Groups
    • FAQs
    • API Docs
    1. Home
    2. nlptechguy
    3. Posts
    N
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    Posts made by nlptechguy

    • How to generate Authorization token for Historical API?

      I have login details in loginDetails field:
      const {feedToken,jwtToken,refreshToken} = loginDetails
      const historyToken = Bearer ${feedToken}
      var historyData = JSON.stringify({"exchange":"NSE","symboltoken":"3045",
      "interval":"ONE_MINUTE","fromdate":"2021-02-08 09:00",
      "todate":"2021-02-08 09:16"});

      var historyConfig = {
      method: 'post',
      url: 'https://apiconnect.angelbroking.com/rest/secure/angelbroking/historical/v1/getCandleData',
      headers: {
      'X-PrivateKey': apiKey,
      'Accept': 'application/json, application/json',
      'X-UserType': 'USER',
      'X-SourceID': 'WEB',
      'X-ClientLocalIP': '192.168.29.100',
      'X-ClientPublicIP': '192.168.29.100',
      'X-MACAddress': 'ac:50:db:dd:78:b1',
      'Authorization': historyToken,
      'Content-Type': 'application/json'
      },
      data : historyData
      };
      I am using feedToken but getting invalid token error.

      posted in Bugs
      N
      nlptechguy