2016-10-15 20 views
2

我想用google APIs中提到的python進行監視請求,但它不起作用。在gmail API中的監視請求不起作用

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

我無法找到一個圖書館或使用gmail.users()功能的軟件包。如何使用訪問令牌發出觀看請求?

回答

0

做在Gmail中Python客戶端(由谷歌提供).under主要功能

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