Correct format for a Base Encryption string for Oauth 1.0 for a PATCH request

27 Views Asked by At

Does anyone know what the correct format is for a base encryption string in Oauth 1.0 for a request? I tried the formats below, I test them against a Python Oauth library, and so far I have been unable to generate the correct Oauth signature.

POST&https://api.example.com/api/v2/image?_method=PATCH&oauth_consumer_key=...
PATCH&https://api.example.com/api/v2/image?_method=PATCH&oauth_consumer_key=...
PATCH&https://api.example.com/api/v2/image?&oauth_consumer_key=...
1

There are 1 best solutions below

0
Art F On

Ok, I figured out the issue, the correct format (at least for the SmugMug API) is:

POST&https://api.smugmug.com/api/v2/image/F6qBW8x-4&_method=PATCH&oauth_consumer_key=...

And the "&" before "&_method" should not be encoded before hashing the signature. Quite confusing.