首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Podio标签API调用

Podio标签API调用
EN

Stack Overflow用户
提问于 2021-03-16 22:26:39
回答 1查看 34关注 0票数 0

我想通过Podio API将标签添加到Podio项目,但我正在努力正确地格式化json正文。

当我收到400的时候,我想我的请求是正确的,问题出在json格式中。请参阅下面的代码。

有什么建议吗?

为了确保,我使用Integromat进行API调用(Podio`s的“进行API调用”模块)

代码语言:javascript
复制
{
    "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"
            ]
        }
    }
}
EN

回答 1

Stack Overflow用户

发布于 2021-05-29 02:03:10

你的身体是错的。

如果你想创建带有"test1“和"test2”值的标签,你的主体应该是:

代码语言:javascript
复制
["foo","bar"]

它应该是标记的JSON数组。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/66657196

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档