How to reply to user's last conversation?
justinjdickow opened this issue · comments
Justin Dickow commented
What's the proper way to reply to a user's last conversation?
I'm trying
conversations = intercom_client.conversations.find(email=user.email)
last_convo_id = conversations.conversations[0]['id']
intercom_client.conversations.reply(
id=last_convo_id,
type='user',
email=user.email,
body=body,
message_type='message'
)
But receiving the following error
intercom.errors.ResourceNotFound: User Not Found
I've also tried
intercom_client.conversations.reply(
id='last',
type='user',
email=user.email,
body=body,
message_type='message'
)
Based on a few other issues but get the same error. I have confirmed that I have conversations started with this user, and can create new ones using
intercom_client.messages.create(**{
'from': {
'type': 'user',
'id': user.id
},
'body': body
})
But seem unable to reply to any of them
Justin Dickow commented
My issue was to use intercom_user_id=user.id
and message_type='comment'