node red access to google calendar api not working

Viewed 318

I try to list google calendar events in a node red flow.

First I tried node-red-node-google

This worked but I only can fetch the next event and not all events in the future

Then I tried node-red-contrib-google

The configuration node needs the scopes (i.e. "www.googleapis.com/auth/calendar") and for authentication a JSON Key

If I'm using the JSON of a Service Account, the result ist success, and the items array is empty: this is correct because google says, that the only valid authentication for the calendar api is Outh2 (this changed last year and this node is 3 years old)

Then I'm using the JSON of a OAuth2-Client-ID

{
    "web": {
        "client_id": "999999-xxxxxxxx.apps.googleusercontent.com",
        "project_id": "calendar-sync",
        "auth_uri": "https://accounts.google.com/o/oauth2/auth",
        "token_uri": "https://oauth2.googleapis.com/token",
        "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
        "client_secret": "xxxxxxxxxxx",
        "redirect_uris": [
            "https://xxxxxxxx-node-red.eu-gb.cf.appdomain.cloud/red/google-credentials/auth/callback"
        ],
        "javascript_origins": [
            "https://xxxxxxxx-node-red.eu-gb.cf.appdomain.cloud"
        ]
    }
}

but the node throws an error: "Error: No key or keyFile set."

Does anyone have a working solution to access google calendar events from node red?

Thanx

Frank

0 Answers
Related