Closed cincoai closed 6 years ago
I noticed the signature calculated by your code is different from the one calculated by AWIS sample Java code.
This is because the timestamp is not UTC, which is required by AWIS. This should fix it:
def create_timestamp(self): now = datetime.datetime.utcnow() timestamp = now.isoformat() + "Z" return timestamp
Im with python 3 I have made some changes to your files but when I try this.
from myawis import *
Access_Key_ID="x" Secret_Access_Key="x" URLINFO_RESPONSE_GROUPS="History" RANGE=str(30) START=str(20180128) obj = CallAwis('www.ripple.com',URLINFO_RESPONSE_GROUPS, Access_Key_ID, Secret_Access_Key)
print(obj.traffichistory(RANGE,START))
I get this error:
<?xml version="1.0" encoding="utf-8"?>
@cincoai Please verify once, Implemented V4 signing process by @liehendi11
obj=CallAwis('www.dealsea.com','Rank', 'my id', 'my key')
obj.urlinfo()
Returns:
<?xml version="1.0" encoding="unicode-escape"?>\nRequest has expired. Timestamp date is 2017-08-31T00:41:56.381165 e6ee50f7-5ca7-a1f4-2866-8a34076f48e6
RequestExpired