Не удается получить пример google-api-python-client/samples/urlshortener/ для работы

Я пытаюсь написать скрипт на python, который получит число кликов по сокращенному URL моего goo.gl. Я подумал, что мог бы попытаться заставить этот образец работать сначала:

https://github.com/google/google-api-python-client/tree/master/samples/urlshortener

У меня есть мой client_secrets.json заполнено так (на самом деле client_id и client_secret запутаны) здесь:

{
  "other": {
    "client_id": "[['mYcLIent_1dapps.googleusercontent.com']]",
    "client_secret": "[['mYCLient_53cr3t']]",
    "redirect_uris": [],
    "auth_uri": "https://accounts.google.com/o/oauth2/auth",
    "token_uri": "https://accounts.google.com/o/oauth2/token"
  }
}

Но когда я выполняю скрипт, я получаю это:

$ ./urlshortener.py --logging_level=DEBUG
WARNING: Please configure OAuth 2.0

To make this sample run you will need to populate the client_secrets.json file
found at:

   ./client_secrets.json

with information from the APIs Console <https://code.google.com/apis/console>.

0 ответов

Другие вопросы по тегам