jonnekaunisto / simple-youtube-api

Object-oriented Wrapper for Youtube API in Python
https://simple-youtube-api.rtfd.io
Other
74 stars 16 forks source link

InvalidClientSecretsError: Missing property "redirect_uris" in a client type of "web". #42

Open bababooey1234 opened 3 years ago

bababooey1234 commented 3 years ago

I followed the "Generating YouTube API Keys" instructions on the PyPI page and ran the example script with the downloaded client_secret.json file in the same folder.

To create the credentials I clicked Create Credentials -> Youtube Data API v3 -> user data -> added the youtube.upload scope -> applicaion type 'web application' (It's a desktop application but that's what the tutorial said to do) -> create -> download, and changed the filename to just client_secret.json

How do I get it to work? Also where do I get the credentials.storage file?

Traceback:

Traceback (most recent call last):
  File "C:\Users\papyr\Desktop\cvstuff\simplepyupload.py", line 6, in <module>
    channel.login("client_secret.json", "credentials.storage")
  File "C:\Users\papyr\AppData\Roaming\Python\Python39\site-packages\simple_youtube_api\Channel.py", line 83, in login
    flow = flow_from_clientsecrets(client_secret_path, scope=scope)
  File "C:\Users\papyr\AppData\Roaming\Python\Python39\site-packages\oauth2client\_helpers.py", line 133, in positional_wrapper
    return wrapped(*args, **kwargs)
  File "C:\Users\papyr\AppData\Roaming\Python\Python39\site-packages\oauth2client\client.py", line 2134, in flow_from_clientsecrets
    client_type, client_info = clientsecrets.loadfile(filename,
  File "C:\Users\papyr\AppData\Roaming\Python\Python39\site-packages\oauth2client\clientsecrets.py", line 165, in loadfile
    return _loadfile(filename)
  File "C:\Users\papyr\AppData\Roaming\Python\Python39\site-packages\oauth2client\clientsecrets.py", line 126, in _loadfile
    return _validate_clientsecrets(obj)
  File "C:\Users\papyr\AppData\Roaming\Python\Python39\site-packages\oauth2client\clientsecrets.py", line 99, in _validate_clientsecrets
    raise InvalidClientSecretsError(
oauth2client.clientsecrets.InvalidClientSecretsError: Missing property "redirect_uris" in a client type of "web".
m256 commented 1 year ago

getting the same

DPS777 commented 1 year ago

I was getting the same error, just change the application type from web application to desktop application.