Google will, in November 2014, switch over to the new V3 API’s and as well, require programs that use google API’s to Authenticate. Plugins which use earlier versions of the API will, apparently, stop working. For Mios plugins - the appropriate way to authenticate is through a service account. Google does not provide specific SDK for Lua and Mios does not have at least one of the lua modules typically used for oAuth2 authentication - plus these tend to be a bit ‘heavy’ for what is required.
Attached is the lua code that I will incorporate into the Google Calendar 3 (GCal3) plugin - the V3 api version of the Google Calendar II plugin. I’m posting it as a separate test harness for any other developer that has to go this route. The test code downloads two files additional files (1) json.lua module and (2) a quite small bash script (googlejwt.sh) which uses linux libraries to perform the authentication.
The lua program is most easily used with Zerobrane for Vera (which I highly recommend) and in any case should be well enough commented to follow. It’s self contained in that it has example code to retrieve calendar events.
Note that the accompanying documentation is for GCal3, which calls for a file GCal3.json whereas the test code needs the file to be named Test.json. Similarly, it will create a subdirectory to /etc/cmh-ludl called Test which will contain the credentials.