Ruby on Rails Thursday, March 12, 2015

I try subscribe notification for withings i use
http://oauth.withings.com/api/doc#api-Notification-notify_subscribe it
always return 342 - The signature (using Oauth) is invalid.


I use base string to create signature

GET&https%3A%2F%2Fwbsapi.withings.net%2Fnotify&action%3Dsubscribe%26callbackurl%3Dhttp%253A%252F%252Fstaging.medic-trust.com%252Fwearables%252Fwebhooks%252Fwithings%26comment%3DMedicTrust%26oauth_consumer_key%3D40b7c20955f4193d4ce51248f5c0921281f99483fdd5c6857b0d2974cd2340%26oauth_nonce%3Dc2e7423a12%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D1426142430%26oauth_token%3Df9c32509ef7b690e88b2f17e1ddcfb0ed957e420ee02be2328f6f252329d%26oauth_version%3D1.0%26userid%3D6689931


and use customer secret and token secret with '&' and percent encode


And hit withings

/notify?action=subscribe&callbackurl=http%3A%2F%2Fstaging.medic-trust.com%2Fwearables%2Fwebhooks%2Fwithings&comment=MedicTrust&oauth_consumer_key=40b7c20955f4193d4ce51248f5c0921281f99483fdd5c6857b0d2974cd2340&oauth_nonce=c2e7423a12&oauth_signature=ea7K1hvCbAsxl3bChwnrdAPR%2BDc%3D&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1426142430&oauth_token=f9c32509ef7b690e88b2f17e1ddcfb0ed957e420ee02be2328f6f252329d&oauth_version=1.0&userid=6689931
But always return 342

--
Posted via http://www.ruby-forum.com/.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/bf997bd0628378b4302ed2f8ea137773%40ruby-forum.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment