I can\'t get gmail api to work. I\'m using server-to-server authentication with JWT.
google-api-python-client==1.4.0
httplib2==0.9
oauth2client==1.4.7
pycryp
Try:
credentials = SignedJwtAssertionCredentials(client_email,
private_key,
scope=OAUTH_SCOPE,
sub='user@yourdomain.com')
The sub= tells the Service Account which account you wish to impersonate. Without it, you're authenticating as the Service account user which, as Eric pointed out, doesn't have a Gmail mailbox.