janvda / node-red-contrib-google-photos

Node-RED node for Google APIs using OAuth2.
MIT License
0 stars 0 forks source link

node-red-contrib-google-photos

Node-RED node for the Google Photos API.

Implementation Details

This Node is derived from node-red-contrib-google-oauth2. It reuses a big part of its implementation - especially the OAuth2 authentication.

The implementation of the Google Photos API is based on the googlephotos package (github).

Features (TO BE UPDATED)

This node is a wrapper for official Google APIs Node.js Client: google-api-nodejs-client.

List of available APIs are delivered online via Google API Discovery Service.

Package contains two nodes. There is configuration node made for maintaining connection to Google API Services (google-credentials) and regular node providing posibility to call any method of any API exposed via official Google's Node.js Client.

How to Install

Run the following command in the root directory of your Node-RED install

npm install janvda/node-red-contrib-google-photos

or for a global installation

npm install -g janvda/node-red-contrib-google-photos

Configuration (TO BE UPDATED)

  1. Generate OAuth credentials at Google API Console.

    • Choose Web Application.
    • As Authorized JavaScript origins enter your Node-RED IP (e.g. http://localhost:1880)
    • As Authorized redirect URIs enter your Node-RED IP plus /google-credentials/auth/callback (e.g. http://localhost:1880/google-credentials/auth/callback)
  2. Copy the Client ID and Client secret and paste them into the Config Node

Interesting Commands

  1. open shell in container : docker exec -it node-red-google-photos /bin/bash
    • (re)install google-photos node: npm install /data/node-red-contrib-google-photos