I would like to integrate a Withings smart scale into an Android app I am developing. I am following the getting started instructions in the withings developer documentation here. For this I need to register my app here and it requires a "Callback URL". Here are the details Withings provides for the Callback URL:
Partner URL called by our system to send notifications through HTTP POST requests. Make sure that your server can handle a HTTP HEAD request called to verify the validity of your url.
Your URL must :
be a valid URL, provided as a URL-encoded string. Please refer to w3schools URL encoding reference to learn more about URL encoding.
not be greater than 255 characters.
neither contain an IP or 'localhost'. Only port 80 and 443 are allowed.
How do I setup a callback URL for an android app that will be able to receive POST requests?
A mobile application cannot be a callback URL because it has no static address for the API server to callback to. For example, your Android IP changes when you move from a mobile network, to your home wifi, to a coffeeshop.
What you need is a server in-between the mobile app and the Auth endpoint that can securely communicate login tokens. You can find a similar flow using a service like Auth0
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With