1

I'd like to upload some photos to my google photos with my simple Python code. So, first, I creat my project in google API and I enable "Google Photo" in Library. After that, I create OAuth 2.0 Client ID. I chose "Web application" and I input:

  • http://localhost:8080 for ‘Authorized JavaScript origins’.
  • http://localhost:8080/ for ‘Authorized redirect URIs’ Here I think that I finish my parameters in google API, so I download the .Json file and I start my Python code:

'''from gphotospy import authorize CLIENT_SECRET_FILE = "gphoto_oauth.json" service = authorize.init(CLIENT_SECRET_FILE)'''

However, I obtained this message error in French: "OSError: [WinError 10013] Une tentative d’accès à un socket de manière interdite par ses autorisations d’accès a été tentée"

I changed the 8080 port as indicated in other site, but I obtained the same message error. I think that the problème is in "http://localhost:8080" because I don't know why I use the localhost. So, did you have any idea.

1 Answers1

0

In my case, I just include http://localhost:8080/ in URI authorization and works for me for the development environment. One important aspect to be verified is related to the service. Check if the Browser opened and follow the authorization steps to establish connection.

I good tutorial that I´m following is that: https://dev.to/davidedelpapa/manage-your-google-photo-account-with-python-p-1-9m2