Reputation: 1787
I am using Withings API.
Everything works fine. Then i tried with Notification API and able to successfully subscribe to the notification and can get, list and revoke notification also.
With the same source code, after 1 day, Notification API (action: subscribe, get, revoke) is always responding me with status code 293: The callback URL is either absent or incorrect.
but (action: list) always give me the status : 0 with other information which also includes my notification callback url as a user subscription result list.
i have checked the notification call back url is there for three operation (action: subscribe, get, revoke) and adding it here so that you guys can also see.
also note my notification callback url is not exceeded the 255 character.
Encoded url:
https://wbsapi.withings.net/notify?action=revoke&userid=7354839&callbackurl=http%3A%2F%2Fwww.myrealIpdomain.com%2FRPWearableIntegrationAPI%2Fapi%2FWithingsAPI%2FNotificationCallBack&oauth_consumer_key=c899ec52892c37097893c561f43c3104c72f33c82509d1881471bb3d&oauth_nonce=3d0j1rt6&oauth_signature=Fnm1or9%2BhtIaee7bJ5ylGS3kwjM%3D&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1431431635&oauth_token=4e871c205fd1b3717db34d088e632ed6c9ce01854f6dcdc05c79e325640&oauth_version=1.0
decoded url:
https://wbsapi.withings.net/notify?action=subscribe&userid=7354839&callbackurl=http://www.myrealIpdomain.com/RPWearableIntegrationAPI/api/WithingsAPI/NotificationCallBack&comment=NotificationDescriptionM2SYS&appli=1&oauth_consumer_key=c899ec52892c37097893c561f43c3104c72f33c82509d1881471bb3d&oauth_nonce=6rx29eh0&oauth_signature=DNntmrO/+zYUgRIuR4yzPKezpY8=&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1431435259&oauth_token=4e871c205fd1b3717db34d088e632ed6c9ce01854f6dcdc05c79e325640&oauth_version=1.0
I am not able to figure it our what did i missed here? any help or information would be highly appreciated if some one can found any.
Also i am not able to get any url regarding the Withings integration developer forum. if anyone know can help me also.
Upvotes: 3
Views: 1003
Reputation: 411
I was also experiencing this problem. Using HTTP and url-encoding the address did not help.
Turns out that the Withings API needs a fast response (under 1 second?) and my local flask server being tunneled through ngrok did not reply fast enough. I solved this by enabling threading in the flask server.
app.run(port=8080, debug=True, threaded=True)
Upvotes: 1
Reputation: 493
This doesn't appear to be the problem here, but sharing anyway in case someone ends up on this page via Google. I just faced the same puzzling error and using regular HTTP instead of HTTPS for the callback URL fixed it for me. Seems to be a bug on the end of Withings. Anyway, the callbacks don't contain any sensitive data, so while annoying this doesn't appear to be a major showstopper.
Upvotes: 1