Какой файл указать в CREDENTIALS_FILE
Делаю бота в телеграм и дело дошло до деплоя на Хероку. Но я в своем боте задействовал библиотеку гугл для управления google sheets.
import googleapiclient.discovery
from oauth2client.service_account import ServiceAccountCredentials
from datetime import datetime
from googleapiclient.http import MediaFileUpload
import os
import json
def send_values_to_table(table_name, operation, score, link="", amount=""):
CREDENTIALS_FILE = (".profile")
spreadsheet_id = os.environ.get("spreadsheet_id")
credentials = ServiceAccountCredentials.from_json_keyfile_name(
CREDENTIALS_FILE,
["https://www.googleapis.com/auth/spreadsheets",
"https://www.googleapis.com/auth/drive"])
httpAuth = credentials.authorize(httplib2.Http())
service = googleapiclient.discovery.build("sheets", "v4", http = httpAuth)
Строка spreadsheet_id = os.environ.get("spreadsheet_id")
принимает значение из Config Vars Heroku.
Но вот в CREDENTIALS_FILE = (".profile")
проблема, я не знаю что сюда указывать.
делал я все по этому гайду: https://medium.com/@mandarvaze/how-to-safely-use-google-application-credentials-on-heroku-4e310ad67934
У меня на Heroku сейчас вот так:
Подскажите, что ввести в CREDENTIALS_FILE чтоб все заработало