Answered

API Reply to the last conversation is failing - user not found

  • 22 January 2021
  • 2 replies
  • 40 views

Hi, this is my first post, so go easy :)

 

I'd like to reply to the last conversation using the api. The URL I'm calling is: 

https://api.intercom.io/conversations/last/reply/p>

 

I'm using this as reference - https://developers.intercom.com/intercom-api-reference/reference#reply-to-a-conversation/p>

 

The message body looks approximately like this:

 

{

  "message_type": "comment",

  "type": "user",

  "user_id": "usersemail@aferry.com",

  "body": "Test message"

}

 

I've confirmed this user exists but I get this response:

 

{

    "type": "error.list",

    "request_id": "000sdhmlsb3j8gk6qieg",

    "errors": [

        {

            "code": "not_found",

            "message": "User Not Found"

        }

    ]

}

Any ideas appreciated. I can't see what could be wrong.

icon

Best answer by Roy 23 January 2021, 02:37

View original

2 replies

Userlevel 1
Badge

Hello @james c12​ , ID is a Contact ID, not an e-mail address.

This is a correct ID for API call:

userid

Thanks Roy, it was a combination of this and incorrect http headers.

😀

Reply