Если я запущу этот код,
Код: Выделить всё
conn = http.client.HTTPSConnection("api.icicidirect.com")
payload = json.dumps({})
#time_stamp & checksum generation for request-headers
time_stamp = datetime.utcnow().isoformat()[:19] + '.000Z'
checksum = hashlib.sha256((time_stamp+payload+API_SECRET).encode("utf-8")).hexdigest()
headers = {
'Content-Type': 'application/json',
'X-Checksum': checksum,
'X-Timestamp': time_stamp,
'X-AppKey': API_KEY,
'X-SessionToken': Session_Token
}
conn.request("GET", "/breezeapi/api/v1/dematholdings", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
Код: Выделить всё
{"Status":5,"Error":"Invalid length for a Base-64 char array or string."}Question: Am I missing anything?
Источник: https://stackoverflow.com/questions/734 ... -or-string