【问题标题】:JSON-RPC Protocol in Integromat appsIntegromat 应用程序中的 JSON-RPC 协议
【发布时间】:2020-09-18 08:35:53
【问题描述】:

如何在自定义 Integromat 应用程序中实现 json-rpc 协议?我在 Integromat 文档中没有找到关于主题的任何内容。

【问题讨论】:

    标签: integromat integromat-apps


    【解决方案1】:

    没有任何特定于 JSON-RPC requestresponse 的东西会阻止 Integromat 应用程序与此类 API 进行通信。

    一个区别是所有模块的 URL 通常是相同的,而方法是在请求正文中指定的。 请求的 ID 可以是随机数,参数在正文中与方法名称一起发送。

    查看下面的代码示例,urlbaseUrl 相同,body.id 是自动生成的UUID。 JSON-RPC 响应正文包含一个名为 result 的字段,您可以在其中找到模块应输出的实际数据。

    {
        "url": "/",
        "method": "POST",
        "body": {
            "method":"createAccount",
            "params": {
                "objects": [
                    "{{parameters}}"
                ]
            },
            "id": "{{uuid}}"
        },
        "response": {
            "output": "{{body.result.account}}"
        }
    }
    

    【讨论】:

      猜你喜欢
      • 2014-08-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-06-02
      • 2012-11-07
      • 1970-01-01
      相关资源
      最近更新 更多