简体   繁体   English

调用 Quip API 时出现“缺少参数”错误 - 添加成员方法

[英]Getting 'Missing argument' error when calling Quip API - add members method

I'm trying to use the Quip admin and automation APIs to add members to a document from a Salesforce trigger.我正在尝试使用 Quip 管理和自动化 API 从 Salesforce 触发器向文档添加成员。 I've successfully used the GET methods for verify token and get user from the automation API, but I'm getting an error when I call add members from the Admin API.我已成功使用 GET 方法验证令牌并从自动化 API 获取用户,但是当我从 Admin API 调用添加成员时出现错误。 The error I'm getting is 'Missing argument thread_id', despite passing in a valid thread id.尽管传入了有效的线程 ID,但我得到的错误是“缺少参数 thread_id”。 If I copy the body from the request into Postman it works fine.如果我将请求中的正文复制到 Postman 中,它可以正常工作。 The Salesforce org is a developer sandbox. Salesforce 组织是一个开发人员沙盒。

These are the debug lines from Salesforce:这些是来自 Salesforce 的调试行:

USER_DEBUG [332]|DEBUG|System.HttpRequest[Endpoint=https://platform.quip.com/1/admin/threads/add-members?company_id=JKNAcB0VIMy, Method=POST] USER_DEBUG [332]|DEBUG|System.HttpRequest[Endpoint=https://platform.quip.com/1/admin/threads/add-members?company_id=JKNAcB0VIMy, Method=POST]

USER_DEBUG [336]|DEBUG|Body req = {"thread_id":"eNiVAcaDICco","member_ids":"KPDAFRZtNRW"} USER_DEBUG [336]|DEBUG|Body req = {"thread_id":"eNiVAcaDICco","member_ids":"KPDAFRZtNRW"}

USER_DEBUG [337]|DEBUG|Body response = {"error":"application_error","error_code":400,"error_description":"Missing argument 'thread_id'"} USER_DEBUG [337]|DEBUG|正文响应 = {"error":"application_error","error_code":400,"error_description":"缺少参数 'thread_id'"}

USER_DEBUG [339]|DEBUG|Method = POST USER_DEBUG [339]|调试|方法 = POST

USER_DEBUG [340]|DEBUG|Scope = USER_READ ADMIN_MANAGE USER_DEBUG [340]|DEBUG|范围 = USER_READ ADMIN_MANAGE

USER_DEBUG [341]|DEBUG|Authorisation = Bearer UkRQQU1AcXymZ1M=|1692717157|N4CCVoKA8MY4sNF/+mBeWzX5lXAeI/q/YKxSMhC9PJc= USER_DEBUG [341]|调试|授权=承载UkRQQU1AcXymZ1M=|1692717157|N4CCVoKA8MY4sNF/+mBeWzX5lXAeI/q/YKxSMhC9PJc=

Any help would be much appreciated任何帮助将非常感激

我发现了问题,它是标题中的内容类型,需要将其设置为 application/json

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM