Skip to main content
Answered

Intercom API Contact Search Returns User Not Found

  • February 7, 2023
  • 2 replies
  • 273 views

I am trying to search for a user based on an email using the v2.8 intercom API.

 

If I retrieve a specific contact using this URL

https://api.intercom.io/contacts/63e271ce28fe8babf612b417/code>

I get the contact object as expected. If I then use the email of the response to search for that contact like so

https://api.intercom.io/contacts/search/code>

with this body

{
"query": {
"field": "email",
"operator": "=",
"value": "my email"
}
}

I get the following response

{
"type": "error.list",
"request_id": "0000i0aso7mmifvpqc1g",
"errors": [
{
"code": "not_found",
"message": "User Not Found"
}
]
}

Any hints on what the problem is?

 

 

 

 

Best answer by Oseas

Hey @louis m​! Oséas here from the Customer Support Specialist team 🕵️

 

That's likely because you're making a GET request to https://api.intercom.io/contacts/search.To search for contacts, you need to send a POST request instead. That's how it would look like:

POST /contacts/search HTTP/1.1
Host: api.intercom.io
Authorization: <TOKEN>
Content-Type: application/json
 
{
"query": {
"field": "email",
"operator": "=",
"value": "user_email"
}
}

 

View original
Did this topic help you find an answer to your question?

2 replies

Oseas
Employee
Forum|alt.badge.img+4
  • Employee
  • 103 replies
  • Answer
  • February 10, 2023

Hey @louis m​! Oséas here from the Customer Support Specialist team 🕵️

 

That's likely because you're making a GET request to https://api.intercom.io/contacts/search.To search for contacts, you need to send a POST request instead. That's how it would look like:

POST /contacts/search HTTP/1.1
Host: api.intercom.io
Authorization: <TOKEN>
Content-Type: application/json
 
{
"query": {
"field": "email",
"operator": "=",
"value": "user_email"
}
}

 


search not works for external_id
I tried to search contacts by external_id (visitor_id), not retrieved


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings