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

266 views Asked by At

I'm trying to use the Quip admin and automation APIs to add members to a document from a Salesforce trigger. 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. The error I'm getting is 'Missing argument thread_id', despite passing in a valid thread id. If I copy the body from the request into Postman it works fine. The Salesforce org is a developer sandbox.

These are the debug lines from Salesforce:

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 [337]|DEBUG|Body response = {"error":"application_error","error_code":400,"error_description":"Missing argument 'thread_id'"}

USER_DEBUG [339]|DEBUG|Method = POST

USER_DEBUG [340]|DEBUG|Scope = USER_READ ADMIN_MANAGE

USER_DEBUG [341]|DEBUG|Authorisation = Bearer UkRQQU1AcXymZ1M=|1692717157|N4CCVoKA8MY4sNF/+mBeWzX5lXAeI/q/YKxSMhC9PJc=

Any help would be much appreciated

1

There are 1 answers

0
Roxy521 On

I found the issue, it was the content-type in the header, it needed to be set to set to application/json