我正在尝试通过python Google api客户端库从Google表格中读取内容,但收到403权限被拒绝。 即使我拥有读取访问权限,该工作表也不属于我所有。
service = discovery.build('sheets', 'v4', credentials=get_credentials())
range_ = "Sheet1"
return service.spreadsheets().values().get(spreadsheetId=JOURNEY_SHEET, range=range_).execute()['values'][1:]
Error condition
{
"error": {
"code": 403,
"message": "The request is missing a valid API key.",
"status": "PERMISSION_DENIED"
}
}