I get a 400 "Query body must contain a query hash".
When using contact search everything works fine
Best answer by Roy
View originalBest answer by Roy
View originalHi,
we call https://api.intercom.io/conversations/search/p>
with body params:
{
"query": {
"field": "contact_ids",
"operator": "=",
"value": "600bfa5ff56b2ea78672f2d0"
}
}
@user919 , I just tested this out, it's working fine from me. Can you confirm that you are sending JSON request from Postman?
(I think there some problems with your Postman configuration).
Yes, I confirm that.
I am using postman. This API https://developers.intercom.com/intercom-api-reference/reference#search-for-conversations/p>
with body: {
"query": {
"field": "contact_ids",
"operator": "=",
"value": "600bfa5ff56b2ea78672f2d0"
}
}
But we still get 400 Bad request and response:
{
"type": "error.list",
"request_id": "001do3dkinhl2i45r9dg",
"errors": [
{
"code": "invalid_query",
"message": "Query body must contain a query hash"
}
]
}
Any hint?
@user919 , Sorry for the late reply here, Sending you some Postman Configuration screenshots:
Body:
Headers:
Can you change the configuration like this and try once again to send the request?
Looking forward.
Thank you very much.
It seems that Content-Type: application/json fixed the issue for us.
Thanks again,
Apostolis
Already have an account? Login
No account yet? Create an account
Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.