i often received this message Authentication credentials were not provided.
please i have been wondering how to add an authorisation API for GET request for HTTP request. on node -red.
i have tried it on Post Man and it works very fine here is the result
[
{
"timestamp": "2021-11-22T22:40:00",
"load_state": "ON",
"load_w": 148.946,
"output_wh_total": 4003.0,
"output_wh_delta": 49.0,
"solar_w": 0.0,
"solar_v": 3.832,
"input_wh_total": 0.0,
"bat_v": 25.258,
"state_of_charge": 100,
"full_charges_count": 1,
"deep_discharges_count": 0,
"bat_chg_total_wh": 0,
"bat_dis_total_wh": 4003,
"bat_usable_ah": 0.0,
"bat_temp": 36.148,
"restart_detected": false,
"signal_strength": -59,
"error_flag": 0
}
]
the API is `https://cloud-solar.com/api/v1/devices/xokM5P/reports?start=1637620800&end=1637620811`
and the header is ` Authorisation: Token 6d423a90252863e3f4cc068546617b452031d167`
just like this
`
![image|690x450](upload://bBv4RQiOGDLVyFzwx4GBnlmMvkM.png)
`
![image|690x450](upload://bBv4RQiOGDLVyFzwx4GBnlmMvkM.png)
thanks
i am not so good in NodeJs,
please how can i filter the the messages so that i will only debug few of the messages
the messages are {"timestamp":"2021-11-22T22:40:00","load_state":"ON","load_w":148.946,"output_wh_total":4003,"output_wh_delta":49,"solar_w":0,"solar_v":3.832,"input_wh_total":0,"bat_v":25.258,"state_of_charge":100,"full_charges_count":1,"deep_discharges_count":0,"bat_chg_total_wh":0,"bat_dis_total_wh":4003,"bat_usable_ah":0,"bat_temp":36.148,"restart_detected":false,"signal_strength":-59,"error_flag":0}