I am trying to authenticate with the withings api. I have got the consumer key and secret correctly and am able to get to the app page, and I can also authenticate with the api.
The problem is that it is not coming back, instead showing a 404 error: page not found. I have cross-checked the callback url many times.
Here's the url.
This is the code I am trying to authenticate with: Documentation, Gem1, Gem2.
I want to get the user back to my application.
@callback_url = 'http://127.0.0.1:3000/auth/withings/callback'
@consumer = OAuth::Consumer.new(WITHINGS_KEY, WITHINGS_SECRET, {
:site => 'https://oauth.withings.com',
:request_token_path => '/account/request_token',
:access_token_path => '/account/access_token',
:authorize_path => '/account/authorize'
})
@request_token = @consumer.get_request_token(:oauth_callback => @callback_url)
session[:request_token] = @request_token
redirect_to @request_token.authorize_url(:oauth_callback => @callback_url)