Closed halfstackpgr closed 6 months ago
The Codeforces API may requires the params to be sorted in lexicographical order. Try.
head = "&".join(sorted(head.split("&")))
# ... ?{head}&apiKey= ...
The Codeforces API may requires the params to be sorted in lexicographical order. Try.
head = "&".join(sorted(head.split("&"))) # ... ?{head}&apiKey= ...
Thank you for the recommendation, but seems like it should be ;
and not &
.
PS: I've fixed the issue but thank you for the review.
Status:
Issue related to Authorization.
Methods
contain these parameters:enable_auth
which is abool
auth_key
which is astring
.secret
which is astring
as well.time
which is anint
representing time inunix
format.Invalid Signature
is being returned from the API.Code where the problem is:
In
AsyncMethod
:In
SyncMethod
:To reproduce the error:
Asynchronous usage:
Synchronous usage:
Reference to authorization with API:
In: Documentation
Ref:
Guessed Problem:
Hashing of
apiSig
. Or the wayapiSig
is hashed.