Solved

404 for newly imported message?

  • 2 June 2023
  • 3 replies
  • 146 views

Badge

I’m successfully creating new conversations by posting `/inboxes/inb_1234/imported_messages` endpont.  it returns something like:

{ 
conversation_reference: '...',
message_uid: 'abcdefg88fbc88046053ecd6e319',
status: 'accepted'
}

I want the conversation id from that so I can add links etc.   So I’m passing the message_uid to messages as so:

curl --request GET \
--url https://api2.frontapp.com/messages/alt:uid:abcdefg88fbc88046053ecd6e319 \
--header 'accept: application/json' \
--header 'authorization: Bearer <token>

but that returns: 

{
"_error": {
"status": 404,
"title": "Not found"
}
}

 

What am I doing wrong?

icon

Best answer by justin 2 June 2023, 23:02

View original

3 replies

Userlevel 3
Badge +7

Hi Steve! 

 Upon initial glance, it looks like you have the right approach but our logs can provide a deeper understanding of what is leading to the 404. Since this requires personal information regarding your instance of Front, we can reach out to you directly. From there we’d be happy to investigate further into these specific requests. 

Thanks!

I’m having the same issue to add a comment to a conversation after posting a new message.
This endpoint returns a 404 but if I set a timeout for 2 seconds, it returns a 200, but I would like to avoid setting a timeout.
Have you find any solution to this ?
Thank you ! 

Userlevel 3
Badge +7

Hi Sophie 👋

When sending a request to create a new message, there are many factors that could contribute to the total time to create the message in Front. If the requests are submitted immediately after one another, it does not sound unusual for this to occur. The 404 would indicate that the message creation was not fully completed before receiving the comment request. If the timeout is resulting in success, it would appear that timing is the extent of the issue and that the comment request should be slightly delayed to allow the creation of the message. If you believe that there is still an issue, or notice an increasing window, please reach out to us and we can investigate your examples on an individual basis. 

Thanks, 
Justin 

Reply