我想通过 Podio API 向 Podio 项目添加标签,但我正在努力正确格式化 json 正文。
当我收到 400 时,我想我的请求是正确的,问题出在 json 格式中。请参阅下面的代码。
请问有什么建议吗?
只是为了确保,我使用 Integromat 进行 API 调用(Podio 的“进行 API 调用”模块)
{
"response": {
"status": 400,
"headers": {
"date": "Tue, 16 Mar 2021 12:10:31 GMT",
"content-type": "application/json; charset=utf-8",
"content-length": "291",
"connection": "close",
"server": "nginx",
"x-rate-limit-remaining": "9990",
"x-rate-limit-limit": "10000",
"x-podio-auth-ref": "********",
"x-podio-request-id": "********"
},
"body": {
"error_parameters": {},
"error_detail": null,
"error_propagate": false,
"request": {
"url": "http://api.podio.com/tag/item/***********/",
"query_string": "",
"method": "POST"
},
"error_description": "Invalid value {\"{text}\": [\"test1\", \"test2\"]} (object): must be array",
"error": "invalid_value"
}
},
"request": {
"url": "https://api.podio.com/tag/item/***********/",/",
"headers": {
"Authorization": "***",
"User-Agent": "Integromat/production"
},
"method": "POST",
"body": {
"{text}": [
"test1",
"test2"
]
}
}
}