Cannot get access token with Google Calendar Api v3

后端 未结 2 613
有刺的猬
有刺的猬 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条回答
  •  -上瘾入骨i
    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
            );
    

提交回复
热议问题