Cannot get access token with Google Calendar Api v3

后端 未结 2 611
有刺的猬
有刺的猬 2021-01-25 14:06

I am trying to put a calendar event into a calendar without the authentication prompt. I have read that using an OAuth Service Account allows you to do this. I have set up the S

相关标签:
2条回答
  • 2021-01-25 14:46

    It sounds like you need to grant access to the google apps domain user data. Link below under section "Delegate domain-wide authority to your service account".

    https://developers.google.com/drive/web/delegation

    0 讨论(0)
  • 2021-01-25 14:46

    You may try set the auth like this:

    $auth = new Google_Auth_AssertionCredentials(
            SERVICE_ACCOUNT_NAME,
            SCOPES,
            $key,
            'notasecret',
            'http://oauth.net/grant_type/jwt/1.0/bearer',
            ADMIN_USER
            );
    
    0 讨论(0)
提交回复
热议问题