View request in gmail API not working

I'm trying to make a view request using python as stated in the google API , but it doesn't work.

request = {
  'labelIds': ['INBOX'],
  'topicName': 'projects/myproject/topics/mytopic'
}
gmail.users().watch(userId='me', body=request).execute()

      

I couldn't find a library or package to use the function gmail.users()

. How do I make a view request using an access token?

+2


source to share


1 answer


Do it in python gmail client (provide google). Main function



request = {
        'labelIds': ['INBOX'],
        'topicName': 'projects/myprojects/topics/getTopic'
    }
    print(service.users().watch(userId='me', body=request).execute())

      

0


source







All Articles