无法使用 Google 日历 API 参数

Unable to Use Google Calendar API Parameters

我正在使用 Google 日历的 API 通过 HTTP 请求 (Axios) 获取我的项目的日历事件数据,但我每次尝试时都会收到 "API key not valid. Please pass a valid API key." 错误使用任何 these 参数。我相当确定我的授权是正确的,但我很困惑,因为甚至 Google 的参考资料说这是可选的......下面的示例:

https://www.googleapis.com/calendar/v3/calendars/.../events?key=... 工作正常,简单到 https://www.googleapis.com/calendar/v3/calendars/.../events?key=...?orderBy=startTime 没有。 (导致错误)

我尝试过不同的键和日历,但没有成功。是否有任何解决方法或我缺少的东西?对堆栈的广泛研究也没有任何帮助。感谢您的帮助。

查询字符串以 ? 开头,后续 key/value 对使用 &

分隔