Authentication Error.

Ouverte
#600 1 commentaire 3 réactions 1 personne assignée Voir sur GitHub

@davidharcombe y travaille déjà.

Depuis le 6/1/2023.

Évaluation

Cette issue n'a pas encore été évaluée.

Description

Summary

Followed the instructions on the site : https://developers.google.com/calendar/api/quickstart/python but got an error Authorized user info was not in the expected format, missing fields client_id, refresh_token, client_secret.

Expected Behavior

I'm using the Token generated via the Credentials / OAuth

Actual Behavior

File "C:\Users\mike\Documents\Work - Scripts\Google Calendar Invite Automation\test.py", line 63, in
main()
File "C:\Users\mike\Documents\Work - Scripts\Google Calendar Invite Automation\test.py", line 25, in main
creds = Credentials.from_authorized_user_file('token.json', SCOPES)
File "C:\Users\mike\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\google\oauth2\credentials.py", line 440, in from_authorized_user_file
return cls.from_authorized_user_info(data, scopes)
File "C:\Users\mike\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\google\oauth2\credentials.py", line 390, in from_authorized_user_info
raise ValueError(
ValueError: Authorized user info was not in the expected format, missing fields client_id, refresh_token, client_secret.

Steps to Reproduce the Problem

Generate a new Oauth client id?

Specifications

  • PPython 3.10.9
  • OS - Windows 10 Pro 22H2
Langage dominant
Python
Étoiles
1.4k
Forks
917
Merge moyen
3 min
PR mergées (30 j)
1

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de googleworkspace/python-samples

Toutes les issues de googleworkspace/python-samples

Issues similaires

Plus d'issues Python

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.