在API引用中声明,除了项目名称之外,所有参数都是可选的。在
但当我尝试这个:
url = 'https://dialogflow.googleapis.com/v2beta1/projects/'+config["DFproject"]+'/agent/intents'
headers = {'Authorization': "Bearer "+access_token, 'content-type': 'application/json'}
r = requests.post(url, headers=headers)
我得到:
^{pr2}$我以为display_的名字来自于响应。 那我该怎么设置呢? 这是API:Google API
错误是您在url中使用了POST。您应该使用GET进行检索。在
如果您想玩弄API,并且似乎无法在Postman上设置身份验证,请随意使用:https://developers.google.com/oauthplayground/
这个供参考:https://cloud.google.com/dialogflow/docs/reference/rest/v2-overview
相关问题 更多 >
编程相关推荐