Cloud Functions(第二代)部署的Google Chat应用回复失败问题求助
Cloud Functions(第二代)部署的Google Chat应用回复失败问题求助
我现在用Python在Cloud Functions(第二代)上搭一个超简单的Google Chat应用,需求特别简单——就是在mail.google.com/chat发消息的时候,应用能回复一句"OK"就行。但现在每次发消息,日志里都会弹出错误,完全没法正常回复,折腾好半天都没搞定,来求助各位大佬!
遇到的错误信息:
Can't post a reply. The Chat app didn't respond or its response was invalid. If your Chat app is configured as an add-on, see "Build Google Chat interfaces" in the Google Workspace add-ons documentation. Otherwise, see "Receive and respond to Google Chat events" in the Chat API documentation.
我的代码实现:
import functions_framework @functions_framework.http def mi_app_de_chat(request): event = request.get_json(silent=True) if event and event.get("type") == "ADDED_TO_SPACE": return {"text": "Your Welcome"} return {"text": "OK"}
我感觉逻辑上没什么毛病啊,有没有大佬能帮我排查下问题出在哪?
内容来源于stack exchange
相关产品推荐
相关产品推荐

