Each time I run this script requires copy/pasting the url and authorizing the application, is it possible to only have to authorize the script once and get a long lived token and then rerun the script to return measurements from withings without having to manually authorize every time? I would like to run this script as a scheduled cron job and pump the values into my own database.
Any help would be much appreciated.