Hi! Thanks so much for the shared open source.
I configured my goolge photo api at API console and the application type is web application.
pretty much followed this link to setup
https://developers.google.com/photos/library/guides/get-started#request-id
And I downloaded the client_secret.json file and run a similar script in my Jupyter Notebook as you wrote (also see below)
from future import print_function
from googleapiclient.discovery import build
from httplib2 import Http
from oauth2client import file, client, tools
SCOPES = 'https://www.googleapis.com/auth/photoslibrary.readonly'
store = file.Storage('credentials.json')
creds = store.get()
if not creds or creds.invalid:
flow = client.flow_from_clientsecrets('client_secret.json', SCOPES)
creds = tools.run_flow(flow, store)
service = build('photoslibrary', 'v1', http=creds.authorize(Http()))
somehow I got this traceback:
usage: ipykernel_launcher.py [--auth_host_name AUTH_HOST_NAME]
[--noauth_local_webserver]
[--auth_host_port [AUTH_HOST_PORT [AUTH_HOST_PORT ...]]]
[--logging_level {DEBUG,INFO,WARNING,ERROR,CRITICAL}]
ipykernel_launcher.py: error: unrecognized arguments: -f C:\Users\BREEZE'S NOTEBOOK\AppData\Roaming\jupyter\runtime\kernel-526b7ffa-00ce-4002-8c52-7023e19ed76a.json
An exception has occurred, use %tb to see the full traceback.
SystemExit: 2
Just want to ask do you have clue of what is wrong here?
Hi! Thanks so much for the shared open source. I configured my goolge photo api at API console and the application type is web application. pretty much followed this link to setup https://developers.google.com/photos/library/guides/get-started#request-id And I downloaded the client_secret.json file and run a similar script in my Jupyter Notebook as you wrote (also see below)
from future import print_function from googleapiclient.discovery import build from httplib2 import Http from oauth2client import file, client, tools
SCOPES = 'https://www.googleapis.com/auth/photoslibrary.readonly' store = file.Storage('credentials.json') creds = store.get() if not creds or creds.invalid: flow = client.flow_from_clientsecrets('client_secret.json', SCOPES) creds = tools.run_flow(flow, store) service = build('photoslibrary', 'v1', http=creds.authorize(Http()))
somehow I got this traceback: usage: ipykernel_launcher.py [--auth_host_name AUTH_HOST_NAME] [--noauth_local_webserver] [--auth_host_port [AUTH_HOST_PORT [AUTH_HOST_PORT ...]]] [--logging_level {DEBUG,INFO,WARNING,ERROR,CRITICAL}] ipykernel_launcher.py: error: unrecognized arguments: -f C:\Users\BREEZE'S NOTEBOOK\AppData\Roaming\jupyter\runtime\kernel-526b7ffa-00ce-4002-8c52-7023e19ed76a.json An exception has occurred, use %tb to see the full traceback.
SystemExit: 2
Just want to ask do you have clue of what is wrong here?