rfancn / aliyun-ddns-client

Python DDNS client for Aliyun
402 stars 137 forks source link

update yunresolver.py #12

Closed q269015385 closed 7 years ago

q269015385 commented 7 years ago

def get_common_params(self): """ Build common params which need invoke Aliyun API :return: dict of all nessary params """

ISO8601 standard: YYYY-MM-DDThh:mm:ssZ, e,g:2015-0109T12:00:00Z (UTC Timezone)

    current_timestamp = datetime.utcnow().strftime('%Y-%m-%dT%H:%M:%SZ')
    signature_nonce = uuid.uuid4()

    common_params = {
        'Format': 'json',
        'Version': '2015-01-09',
        'AccessKeyId': self.access_id,
        'Timestamp': current_timestamp,
        'SignatureMethod': 'HMAC-SHA1',
        'SignatureNonce': signature_nonce,
        'SignatureVersion': "1.0",
    }
rfancn commented 7 years ago

what's the real issue? I have no idea why new issue opened here. Can you describe it with more detail info? Otherwise, I will close it.

JackLee889 commented 7 years ago

代码中 TimeStamp字段改成Timestamp,要不会报错,不知道是不是阿里改了api,以前可以的,这两天不可以了。

lannyyip commented 7 years ago

I get a error message recently.

http response: {"Message":"Timestamp is mandatory for this action.","RequestId":"DEXXXXXXXXXXXXXXXXXX","HostId":"dns.aliyuncs.com","Code":"MissingTimestamp"}

There might be possible that ALI has change the API or the machinesm of the DDNS. Please help to fix.

rfancn commented 7 years ago

Thanks for the feedback, I think Aliyun server side changed the param 'TimeStamp' to 'Timestamp'. Now I fixed it, please check if it works or not.

rfancn commented 7 years ago

With commits: 9fe6fdda43a and 9e54b6863, It works in my test env, close it.