Getting Permission Error for History Api

I have been accessing api using nodejs sdk v3. to get history data

    const inp = {
      symbol: "NSE:SBIN-EQ",
      resolution: "D",
      date_format: "0",
      range_from: "1690895316",
      range_to: "1691068173",
      cont_flag: "1",
    };  

try {
      const history = await fyers.getHistory(inp);
      console.log("history", history);
    } catch (error) {
      console.log("error history", error);
    }

getting following error

error history {
  code: -403,
  message: 'You do not have permission to access this application',
  s: 'error'
}


Being granted permission while creating app

Permissions : Historical Data, Quotes & Market data

Also while generating auth_code - application is authorized with standard window.

Best reply by Suyog Patil

I have got the solution

Instead of limited permission
Permissions : Historical Data, Quotes & Market data

Need all permissions in app while creating
Permissions : Profile Details, Transaction Info, Order Placement, Historical Data, Quotes & Market data

View original
1 reply