Sunshine API returns wrong responses | Community
Skip to main content

Sunshine API returns wrong responses

  • September 2, 2024
  • 0 replies
  • 0 views

Hi!

 

We are using the Sunshine API to process some WhatsApp messages but we detected some issues when we are trying to send template messages.

 

In our application flow, before posting the template message, we try to find the user in Sunshine by their external ID, the conversations, clients, etc. Sometimes, the API response says that it couldn't find the user even if they already exist (weird thing number 1). In those cases, our flow continues and makes a request to create the user, the API responds with a 201, and the user information (weird thing number 2 as it should return a 409 conflict). After that, we create a new conversation and then try to send the message, but this last request fails with a 404 status code saying that the conversation is not found. We don't understand this as we are using the conversation ID returned by the API so it should exist.

 

Could you help us find the issue here? I could add some information about the requests we are making.