7 years ago
API/Script
Hi
I want to create device group named as "Fileserver" in /device/servers This is the first time I am running the script, so could you please check if my script is ok.
Also please le...
Thanks Sarah, Script has been corrected as advised.
Now if I run the script I receive the following error
>>> signature = base64.b64encode(hmac.new(AccessKey,msg=requestVars,digestmod=hashlib.sha256).hexdigest())
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\00098685\AppData\Local\Programs\Python\Python36-32\lib\hmac.py", line 144, in new
return HMAC(key, msg, digestmod)
File "C:\Users\00098685\AppData\Local\Programs\Python\Python36-32\lib\hmac.py", line 42, in __init__
raise TypeError("key: expected bytes or bytearray, but got %r" % type(key).__name__)
TypeError: key: expected bytes or bytearray, but got 'str'