[Solved] Error 403

I followed the docs twice, even if the screenshots are outdated, I managed to find everything.
It works fine with the test calendar.
But with my calendar, I got error 403.
I created a service account with key etc.
I got the json file uploaded in the develop apps stuff.
I believed that uploading the key file remotely didn’t worked as it did not show up the file list. Anyway, I tried locally and still the same issue.
Why is everything with vera so complicated. :frowning:
What should I try next?

Sharing settings of my calendar attached

In this case it’s more that google is (necessarily) complicated :slight_smile: They also obviously have plenty of money as they can afford to constantly change UI’s …

The screen shots, on the surface, look OK. Did you enable calendar API’s for this project ? It is never clear how to interpret these error codes into an application context - but 403 is telling us that there is some authentication issue.

Thank you for your reply.

The calendar API was not enabled :-
I suppose I overlooked it when I deleted everything and tried again.

I did enable it again now. It still say error 403. But sometimes it says “no more events today”.
Of course, I put an event to test.

It seems that if I don’t nothing, it will say “no more event today” but when I click “check” then it’s err 403

Hello hyzteric,

I just dropped you an email, could you reply?

Thank you!

[quote=“Maegda, post:6, topic:199873”]Hello hyzteric,

I just dropped you an email, could you reply?

Thank you![/quote]
Just did.
Thank you!

[quote=“Maegda, post:6, topic:199873”]Hello hyzteric,

I just dropped you an email, could you reply?

Thank you![/quote]

Hi Maegda –
I may be wrong but I think this is the very first time that someone from Vera support has become involved in troubleshooting this plugin.
Have you seen something that makes you suspicious that there is a problem on the vera end ?

The reason I ask is that the error is generated by the plugin following an https.request call to https = require(“ssl.https”).
Is vera seeing a problem with the ssl.https module ?

I went to the test calendar and disabled the google calendar api’s.
I then pressed “check” with GCal3

The message was “Http error code 403” – so this confirms that not enabling the API for the service account is one of (the likely) cause(s) of 403.

The plugin then retries 3 more times to connect (each one after 30 sec). If it still cannot connect, then it tries to display the last good “read” of the calendar. In your case, there was none. Therefore “no more events today”

When I enable the calendar API the error code no longer appears and the plugin functions normally.

You are still getting a 403 error. So I suspect that you were not successful in enabling the google calendar API in the console.

It should look like the attached screen shot

So… The API was enabled.
But anyway I thought I’d give it one more try. Knowing that computers have their moods too…
I went to the vera interface again. Uploaded the same json file again (I mean I didn’t bother to download it from google again).
I “disarmed” the GCal3 Sensor device.
The “Calendar ID” field and the “Credential File” field were empty.
I entered the Calendar ID and clicked the Set button
I entered the Credential File name and clicked the Set button => I got a “DEVICE NOT READY” warning. I closed the popup.
And next thing you know, it’s working!!??
I really don’t know what went wrong the other times.

Thank you again for your time

Prior to the 3.1 release. Whenever CalendarID was set or New Credential file set – I reloaded luup. Partly as a precaution and partly due to some old code structuring that was no longer needed. So that would be the Device not Ready message coming from vera.

As I was making some changes to to play nice with openluup - I saw the opportunity to change the mechanics a little.

Bottom line: if you are on 3.1 then you should not see device not ready – unless of course some other device / plugin / random vera thing caused a luup reload.