首页 > 解决方案 > 将 API 与 Zapier 一起使用,但获取“应用程序返回”“rest_data”参数不正确。需要 JSON 数据“。”

问题描述

所以我从 Airtable 中获取数据,然后使用 Samba Lives API 自定义 PUT 作为第二个操作,特别是 Sessions -> PUT Session https://documenter.getpostman.com/view/2014682/samba-live-rest-api/ 6YzutHM#c87c1db7-2b5c-9b2b-7d63-6b531793cfe2

这是自定义 PUT 中的数据:

Method: PUT
URL: https://samba.live/api/2/ourusername/session
Data Pass-Through? No
Data:
input_type=json&rest_data={
"topic": "Crazy Topic",
"duration": 30, 
"start_time": "2025-09-10 12:00:00", 
"invited_participants":[
{
"email":"flast@company.com",
"first_name":"First",
"last_name":"Last",
"role":2,
"send_email_invitation":true
},
{
"email": "first.last@gmail.com",
"first_name": "First",
"last_name": "Last",
"role": 1,
"send_email_invitation": true
}
],
}
Unflatten- yes
Basic Auth- ourusername|ourpassword
Headers- none

但测试失败并显示“应用返回的“rest_data”参数不正确。应为 JSON。”

我不太确定该尝试什么,Zapier 只是说我们对此无能为力。我唯一能想到的尝试就是删除 input_type 部分,然后返回错误说“需要主题”。当我留下大部分内容并删除了 rest_data 部分时也是如此。

有任何想法吗?

标签: zapier

解决方案


已修复 - 显然 ] 后的逗号将所有内容都丢掉了。


推荐阅读