gmail API中的观看请求无效 [英] Watch request in gmail API doesn't work
本文介绍了gmail API中的观看请求无效的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试使用 google API中提到的python发出监视请求,但是它不起作用.
I am trying to make a watch request using python as referred to in the google APIs but it does not work.
request = {
'labelIds': ['INBOX'],
'topicName': 'projects/myproject/topics/mytopic'
}
gmail.users().watch(userId='me', body=request).execute()
我找不到使用gmail.users()
函数的库或程序包.如何使用访问令牌发出监视请求?
I could not find a library or a package to use gmail.users()
function. How do I make a watch request using an access token?
推荐答案
在gmail python客户端(由Google提供)中执行.在主要功能下
Do it in gmail python client(provide by google).under main function
request = {
'labelIds': ['INBOX'],
'topicName': 'projects/myprojects/topics/getTopic'
}
print(service.users().watch(userId='me', body=request).execute())
这篇关于gmail API中的观看请求无效的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文