0

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

400 错误请求:{"error_parameters":{},"error_detail":null,"error_propagate":false,"request":{"url":"http://api.podio.com/task/","query_string ":"","method":"POST"},"error_description":"无效 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 错误请求:{"error_parameters":{},"error_detail":null,"error_propagate":false,"request":{"url":"http://api.podio.com/task/item/436023600" ,"query_string":"","method":"POST"},"error_description":"无效 JSON","error":"invalid_value"}

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

4

1 回答 1

2

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

需要删除负责人的大括号周围的引号,我需要带有配置文件的引号,它应该是这样的:

{
  "text": "Regarding Absence Request for Vacation",
  "responsible": {"type":"profile", "id": 123 },
  "description": "Your request for Vacation has been denied, please contact your manager."
}
于 2016-06-21T18:34:39.137 回答