You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have implemented the webhook API according to the example for receiving incoming message:
[HttpPost("api/sms/incoming-sms")]
public IActionResult ReceiveSms([FromBody] SmsInboundMessageResult smsInboundMessageResult)
{
foreach (var result in smsInboundMessageResult.Results)
{
System.Diagnostics.Debug.WriteLine($"{result.From} - {result.CleanText}");
}
return Ok();
}
and have configured the HTTP forwarding in the inbound configuration correctly. However, I failed to forward my message and the infobip support provided me the logs showing it encountered bad request error.
2024-12-10 15:12:30.098 UTC
400 Bad Request
Content-Type: application/problem+json; charset=utf-8
{"type":"https://tools.ietf.org/html/rfc9110#section-15.5.1","title":"One or more validation errors occurred.","status":400,"errors":{"incomingMessage":["The incomingMessage field is required."],"$.results[0].receivedAt":["The JSON value could not be converted to Infobip.Api.Client.Model.SmsInboundMessage. Path: $.results[0].receivedAt | LineNumber: 0 | BytePositionInLine: 169."]},"traceId":"xxxxxxxxxxxxx"}
I tested locally and found it will throw error if the receiveAt field is in 2024-12-10T15:12:28.074+0000 format instead of 2024-12-10T15:12:28.074Z, the former is the format that platform uses in forwarding message, and need to handle this situation in SmsInboundMessage
The text was updated successfully, but these errors were encountered:
I have implemented the webhook API according to the example for receiving incoming message:
and have configured the HTTP forwarding in the inbound configuration correctly. However, I failed to forward my message and the
infobip support
provided me the logs showing it encountered bad request error.I tested locally and found it will throw error if the
receiveAt
field is in2024-12-10T15:12:28.074+0000
format instead of2024-12-10T15:12:28.074Z
, the former is the format that platform uses in forwarding message, and need to handle this situation in SmsInboundMessageThe text was updated successfully, but these errors were encountered: