-
Notifications
You must be signed in to change notification settings - Fork 174
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Getting oauth_problem=signature_invalid from Flickr when trying to upload #183
Comments
Thanks for reporting this, it seems like the signature is not being built up correctly. Were you able to look through #109? Did that help at all? |
Getting an signature_invalid error when working with SmugMug and using a query string in the request. Session requests work well with SmugMug API (api.smugmug.com) except when a query is added. Both examples work when used in a browser window with proper authorization. This example works: https://api.smugmug.com/api/v2/node/GS0g9!children This example fails: https://api.smugmug.com/api/v2/node/GS0g9!children?start=11&count=10 The string built within session is Note the first part of the query string "?start=11" is moved to the end of the Uri yet "&count=10" is left in place. The failed example is created when calling session.get("https://api.smugmug.com/api/v2/node/GS0g9!children?start=11&count=10",headers={'Accept': 'application/json'}) The same call without the query string "?start=11&count=10" works. Using python3 (3.4.1) with rauth 0.7.2 Using OAuth1Session to create the session. |
Sounds like a bug in the query string encoding. |
Switched from rauth to requests_oauthlib and works well now. No changes to query string necessary. |
This is a problem when the query string is included in a GET request via the 'url' parameter, rather than added as separate 'params'. this will work: What happens is the base string for the oauth signature strips out the query string and completely discards it. What needs to happen is for the query string to be stripped out and then included in the base string in the same way as if they were provided as a dict to 'params'. I think the way to do this is OAuth1Session.request normalises the above 2 example calls. Reference Appendix A.5.1. Generating Signature Base String at https://oauth.net/core/1.0a/#anchor13 |
Hello, I'm trying to upload an image to flickr and receiving a
signature_invalid
error.This code should reproduce:
The response I get is
401
and the response text saysoauth_problem=signature_invalid
.I see this is related to the closed issue #109, if this should go in that closed thread I'll move it.
The text was updated successfully, but these errors were encountered: