403 Forbidden message when calling the v3 Google Calendar API using a Service Account via OAuth 2.0

后端 未结 3 1207
盖世英雄少女心
盖世英雄少女心 2020-11-30 11:26

This is a follow on from my thread about a 401 error when using the Google Calendar API and OAuth2, which can be found here

This contains details of the account setu

3条回答
  •  死守一世寂寞
    2020-11-30 12:27

    I was also getting the same error even after sharing the calendar as in the Justin's answer. After comparing with another working sample figured out that I have set

    var SCOPES = ["https://www.googleapis.com/auth/calendar.readonly"];
    

    instead of

    var SCOPES = ["https://www.googleapis.com/auth/calendar"];
    

    Hope this helps anyone who has done a similar mistake and getting this error.

提交回复
热议问题