Google API Oauth - refresh tokens?
Ben Rubinstein
benr_mc at cogapp.com
Thu Jul 30 17:08:35 EDT 2020
Back in 2018 when I was originally working with Google sheets, the OAuth
authorisation once granted seemed to refresh automatically.
That is, if a call returned the 'unauthorised' error, calling OAuth with the
same parameters would briefly display a sheet dialog, but it would go away
automatically.
Then I finished working on that project, and when six months I briefly looked
at this again, fell victim to bug #22557.
Now that this is fixed, I'm happily working with the system again (and will
shortly release my code in case it's of use to anyone) - but now when the
authorisation expires (which is does after an hour or so), calling Oauth2 goes
through the process requiring user activity.
There's an OAuth2Refresh command in LiveCode; but the issue is that I don't
get a refresh token from the Google API. From my reading of the docs, only
certain kinds of app registered with Google get refresh tokens - but I don't
seem to be able to figure this out.
Has anyone managed to register an app with Google (in
https://console.developers.google.com/apis/) in a way that means it gets
refresh tokens?
More information about the use-livecode
mailing list