-
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
rauth uses wrong request URI, causes missing consumer key error (?) #14
Comments
Hi, It looks like This is a required parameter and should be provided by the provider service. |
I'm instantiating OAuth1Service as follows below (i've successfully used rauth with another API before, so I don't think I'm confused about this step). Note that, yes, I did substitute the actual value of my key and secret in the actual code, I just don't want to post them here, unless necessary. consumer_key = "my_key" oauth=OAuth1Service( this fails with error code 400 'Missing required parameter: oauth_consumer_key'request_token,request_token_secret = oauth.get_request_token(method='GET') This is what a failed rauth GET request looks like: all the parameters are in the Authorization header rather than in the URI: and here's what the successful request using a different oauth library looks like: |
A couple of things: first make sure Requests is updated to >= 0.12.0. Second try setting header_auth to False. I notice that the other library you're using is sending a querystring. Usually this shouldn't happen when a provider is using header authentication. So maybe fatsecret doesn't support it? If none of that works I'll take a look at it on Monday and track down the issue. |
Oh and one more thing: I've updated rauth to 0.4.8 which includes more transparent error handling for |
Thanks for the help so far. Running with header_auth=False fixes the issue I mentioned above but gave me: |
Parameters can be passed just as they would be to Requests. Simply pass in: |
Thanks- that addresses all my issues. Sorry for the hassle. |
Awesome! Glade it worked out. :) |
hi all, this is a super old thread, but I was trying to get this script by @jrnold to work: and inside, it refers to this link mentioned earlier: I'm running python 2.7 and installed oauth and ConfigureParser using pip, but when it gets to FatSecretClient, it doesn't work, and I think that has to do FatSecretClient being missing and hosting issues.
Do any of you have backups of whatever was on https://bitbucket.org/fmoo/python-fatsecret or @fmoo's contact information so I could ask him about his repo? |
I'm trying to access the fatsecret API. I've successfully accessed this same API with the python-fatsecret library from here https://bitbucket.org/fmoo/python-fatsecret I'm using the exact same consumer key with rauth as I did with python-fatsecret but rauth is giving me the following error in get_request_token: (I added some print statements in service.py)
"response <Response [400]>
response.content Missing required parameter: oauth_consumer_key"
but I'm definitely instantiating OAuth1Service with a consumer key(and I've triple checked that it is correct).
I ran wireshark while getting a request token using rauth and python-fatsecret and noticed these differences:
rauth: OAuth Realm="http://www.fatsecret.com/" and request_URI=/oauth_request_token
python-fatsecret: OAuth Realm="" and request_URI = http://www.fatsecret.com/oauth/request_token?oauth_nonce=77769080&oauth_timestamp=1339285156&oauth_consumer_key=my_key_was_here&oauth_signature_method=HMAC-SHA1&oauth_version=1.0&oauth_signature=8a3mb2veTNIPkW6kNWr8J2pyxQ4%3D&oauth_callback=oob
Any hints on why rauth is doing a GET on the wrong URI(or am I misunderstanding what's going on)? I just pulled from the repo today, so I'm using rauth 0.4.6.
The text was updated successfully, but these errors were encountered: