"Invalid JSON","error":"invalid_value"

"Invalid JSON","error":"invalid_value"

您好,我正在尝试使用 workato 为跑道创建任务。我已经使用他们的 HTTP OAUTH2 连接成功连接到 Podio,但是当我尝试使用 JSON 实际创建任务时,我从 Podio 收到了这个: 这是来自 HTTP:

400 Bad Request: {"error_parameters":{},"error_detail":null,"error_propagate":false,"request":{"url":"http://api.podio.com/task/","query_string":"","method":"POST"},"error_description":"Invalid JSON","error":"invalid_value"}

代码如下:

Request URL : https://api.podio.com/task/item/"the item id" <--This is where I would place the itemID of the item in Podio

Request header:
Authorization: OAuth2 [[User.SiteAccessToken]]
Content-type: application/json

Request Body:
  {
    "text": "Regarding Absence Request for Vacation",
    "responsible":"{"type":profile, "id": "this is my profileID" }",
    "description": "Your request for Vacation has been denied, please contact your manager."
  }

但是当我 运行 这样做时,我收到此错误消息:

400 Bad Request: {"error_parameters":{},"error_detail":null,"error_propagate":false,"request":{"url":"http://api.podio.com/task/item/436023600","query_string":"","method":"POST"},"error_description":"Invalid JSON","error":"invalid_value"}

现在在请求 body 或 header 中是否需要包含我指的是哪个应用程序而不仅仅是项目 ID。不确定它在寻找什么,如果您能提供一些指导,我们将不胜感激。

我发现问题确实出在请求正文中发送的 JSON 中的语法。

responsible 的花括号周围的引号需要删除,我需要带有 profile 的引号,它应该是这样的:

{
  "text": "Regarding Absence Request for Vacation",
  "responsible": {"type":"profile", "id": 123 },
  "description": "Your request for Vacation has been denied, please contact your manager."
}