Reputation: 1959
Like this question, Google Photos API - authentication, I am curious about authentication for Google Photos API. One of the question's answers states that
You need to configure OAUth 2.0 credentials (client ID and secret) and not an API key. More details are in the developer documentation here: https://developers.google.com/photos/library/guides/get-started#request-id
The Google Photos library API acts on behalf of a user, that's why you need to authenticate via OAuth 2.0. As part of this request you also need to specify a scope for your users to accept, see this page for more details: https://developers.google.com/photos/library/guides/authentication-authorization
My problem is that I am trying to build a NodeJs-application that should serve another frontend application with images from google photos. I want to authenticate my backend application with a static "Service account key" (from https://console.developers.google.com/apis/credentials):
I really can't find anyone who has done this before. That makes me think that I might be trying to build something impossible? The google-api-nodejs-client does not support Photos API yet either.
Question: If I log in to my google account and create a "Service account key" (I want my backend to feed my photos), would it be possible to authenticate to Photos API from my NodeJs-backend? How? (I'm not looking for a full solution, just a hint)
Upvotes: 2
Views: 2261