Does the Gmail API support using OAuth Service Accounts?

后端 未结 1 790
耶瑟儿~
耶瑟儿~ 2021-01-14 07:55

I am trying to use the Gmail API with the Python Google Client library.

I have created a Service Account credential through the Google Developer Console.

I a

相关标签:
1条回答
  • 2021-01-14 08:24

    Try using:

    credentials = SignedJwtAssertionCredentials(client_email, private_key,
      'https://www.googleapis.com/auth/gmail.readonly', sub='user@domain.com')
    

    where user@domain.com is the user you wish to impersonate.

    0 讨论(0)
提交回复
热议问题