Google V3 api authentication

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.

Do you think Google Translate service and its TTS feature will be impacted ?
Today, you can invoke a Google TTS request using a simple HTTP request.

[quote=“lolodomo, post:2, topic:182523”]Do you think Google Translate service and its TTS feature will be impacted ?
Today, you can invoke a Google TTS request using a simple HTTP request.[/quote]

You would have to google ::slight_smile: to find out … a quick check gave this page - so it looks like the answer is yes

I found it but it does not mean that the other free and not official service will stop ?
This new API (is it really new ?) is clearly a paid service, so we can forget it.

[quote=“lolodomo, post:4, topic:182523”]I found it but it does not mean that the other free and not official service will stop ?
This new API (is it really new ?) is clearly a paid service, so we can forget it.[/quote]
Your guess is as good as mine. There are both paid and free services in the new API set.

What google have said is that the old API’s will not work as of Nov … there are specific forums you could ask …