获取错误{{{' code':400,'消息':':'无效的JSON有效负载。出乎意料的令牌。
我正在尝试为GoogleAutore运行以下代码,但它给出了错误的JSON有效载荷。
这是代码:
import requests
import json
data = {"comment":"Thank you"}
headers =
{
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64)
AppleWebKit/537.36 " "(KHTML, like Gecko) Chrome/94.0.4606.81
Safari/537.36 Edg/94.0.992.50",
"Authorization": "Bearer {token},
} endpoint="https://mybusiness.googleapis.com/v4/accounts/{accounts_id}/locations/{location_id}/reviews/{reply_id}/reply"
var=requests.put(endpoint, data=data, headers=headers).json()
print(var)
I am trying to run the following code for googleautoreply but it is giving the error 'Invalid JSON payload received.
Here is the Code:
import requests
import json
data = {"comment":"Thank you"}
headers =
{
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64)
AppleWebKit/537.36 " "(KHTML, like Gecko) Chrome/94.0.4606.81
Safari/537.36 Edg/94.0.992.50",
"Authorization": "Bearer {token},
} endpoint="https://mybusiness.googleapis.com/v4/accounts/{accounts_id}/locations/{location_id}/reviews/{reply_id}/reply"
var=requests.put(endpoint, data=data, headers=headers).json()
print(var)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
进行研究后,我知道我们必须以这种方式传递数据
After doing research I got to know that we have to pass the data in this way