Good afternoon,
I'm calling a huawei solar system with API using this code
# Real time data
token = "myToken"
url = "https://eu5.fusionsolar.huawei.com/thirdData/getStationRealKpi"
payload = { "stationCodes":"xxxx" }
header = { "XSRF-TOKEN":token }
response = system.net.httpPost( url, contentType='application/json; charset=utf-8', postData=system.util.jsonEncode(payload), headerValues = header, bypassCertValidation = True )
res_RealTime = system.util.jsonDecode(response)
My problem is that I have to log in and read the token that is present in the cookies. With POSTMAN I can read it without problem as in picture
but with this code
url = "https://eu5.fusionsolar.huawei.com/thirdData/login"
payload = {"userName": "myUser","systemCode": "myCode"}
response = system.net.httpPost( url, contentType='application/json; charset=utf-8', postData=system.util.jsonEncode(payload), bypassCertValidation = True )
print response
I don't know how to read that because I don't have it in the response.
Thanks for the help