我一直在尝试向typeform发送 POST 请求,但我不断收到以下输出:
{"code":"INVALID_PAYLOAD"}
我尝试了以下方法,但未能成功完成请求。标题的使用没有不同的结果。
我将如何正确格式化我的有效载荷?
import requests
import time
epochTime = int(time.time())
token = requests.get("https://typeformtutorial.typeform.com/app/form/result/token/aA7Vx9/default")
data = {
"signature": token,
"form_id": "aA7Vx9",
"landed_at": epochTime,
"answers": [
{
"field": {
"id": "42758279",
"type": "yes_no"
},
"type": "boolean",
"boolean": True
},
{
"field": {
"id": "42758410",
"type": "short_text"
},
"type": "text",
"text": "Hi"
}
]
}
r = requests.post("https://typeformtutorial.typeform.com/app/form/submit/aA7Vx9",
data=data)
print(r.text) #.... INVALID_PAYLOAD