<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Unexpected JSON received by SMS delivery report hook and no client_reference when send had one. in Developer Forum</title>
    <link>https://community.sinch.com/t5/Developer-Forum/Unexpected-JSON-received-by-SMS-delivery-report-hook-and-no/m-p/15161#M79</link>
    <description>&lt;P&gt;That helps alot!&amp;nbsp; I am using per_recipient_final in my send request.&amp;nbsp; &amp;nbsp;When I moved my code from a simple stand alone app into my much larger production code, I must have inadvertently change the delivery_report.&amp;nbsp; My mistake.&amp;nbsp; Thanks for your help.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 30 Apr 2024 14:48:26 GMT</pubDate>
    <dc:creator>SARoadrunners</dc:creator>
    <dc:date>2024-04-30T14:48:26Z</dc:date>
    <item>
      <title>Unexpected JSON received by SMS delivery report hook and no client_reference when send had one.</title>
      <link>https://community.sinch.com/t5/Developer-Forum/Unexpected-JSON-received-by-SMS-delivery-report-hook-and-no/m-p/15148#M73</link>
      <description>&lt;P&gt;New JSON format received by delivery report hook and didnt have client_reference which my code depended on.&amp;nbsp; Client reference was sent.&amp;nbsp; JSON format didnt match docs so broke my code.&amp;nbsp; How many more variations are there?&lt;/P&gt;
&lt;P&gt;{"at":"2024-04-28T22:56:13.840Z","batch_id":"01HWKERMJ8MZKH0YYJPZ6A5ZNZ","client_reference":"true","code":0,"operator_status_at":"2024-04-28T22:56:00Z","recipient":"12103173758","status":"Delivered","type":"recipient_delivery_report_sms"}&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Previously, even if batch had only 1 number in it, the delivery hook JSON would contain a statuses array which contained a recipients array containing just one number as currently documented.&lt;/P&gt;
&lt;P&gt;FWIW I'm using PHP.&lt;/P&gt;
&lt;P&gt;so...&lt;/P&gt;
&lt;P&gt;1. Are there any other JSON variations I should code for?&lt;/P&gt;
&lt;P&gt;2. Why was client_reference set to true?&amp;nbsp; A 32 char hex string was set as client_reference when the SMS was sent.&amp;nbsp; I'll need to restructure my code if client_reference isn't going to work any more.&lt;/P&gt;</description>
      <pubDate>Tue, 30 Apr 2024 08:02:36 GMT</pubDate>
      <guid>https://community.sinch.com/t5/Developer-Forum/Unexpected-JSON-received-by-SMS-delivery-report-hook-and-no/m-p/15148#M73</guid>
      <dc:creator>SARoadrunners</dc:creator>
      <dc:date>2024-04-30T08:02:36Z</dc:date>
    </item>
    <item>
      <title>Re: unexpected JSON received by SMS delivery report hook and no client_reference when send had one.</title>
      <link>https://community.sinch.com/t5/Developer-Forum/Unexpected-JSON-received-by-SMS-delivery-report-hook-and-no/m-p/15150#M75</link>
      <description>&lt;P&gt;Hi Jim, thanks for your patience. We are currently reviewing your query with the engineering team. We can assure you that&amp;nbsp;&lt;SPAN&gt;there have been no updates to the JSON format returned by the API. As a general policy, Sinch will not change the JSON format as it breaks backwards compatibility.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Apr 2024 15:04:56 GMT</pubDate>
      <guid>https://community.sinch.com/t5/Developer-Forum/Unexpected-JSON-received-by-SMS-delivery-report-hook-and-no/m-p/15150#M75</guid>
      <dc:creator>Alexander_Mair</dc:creator>
      <dc:date>2024-04-29T15:04:56Z</dc:date>
    </item>
    <item>
      <title>Re: Unexpected JSON received by SMS delivery report hook and no client_reference when send had one.</title>
      <link>https://community.sinch.com/t5/Developer-Forum/Unexpected-JSON-received-by-SMS-delivery-report-hook-and-no/m-p/15156#M76</link>
      <description>&lt;P&gt;Hi Jim, we have discussed your problem with the team and we would recommend you double check the value of client_reference in your request. This is because the value of client_reference in the response corresponds to the value in the payload. For more information have a look at &lt;A href="https://developers.sinch.com/docs/sms/api-reference/sms/tag/Inbounds/#tag/Inbounds/operation/RetrieveInboundMessage" target="_self"&gt;Inbound Messages&lt;/A&gt; and &lt;A href="https://developers.sinch.com/docs/sms/api-reference/sms/tag/Webhooks/#tag/Webhooks/operation/deliveryReport" target="_self"&gt;Delivery Report webhooks&lt;/A&gt;.&amp;nbsp; Hope this helps.&lt;/P&gt;</description>
      <pubDate>Tue, 30 Apr 2024 08:18:01 GMT</pubDate>
      <guid>https://community.sinch.com/t5/Developer-Forum/Unexpected-JSON-received-by-SMS-delivery-report-hook-and-no/m-p/15156#M76</guid>
      <dc:creator>Alexander_Mair</dc:creator>
      <dc:date>2024-04-30T08:18:01Z</dc:date>
    </item>
    <item>
      <title>Re: Unexpected JSON received by SMS delivery report hook and no client_reference when send had one.</title>
      <link>https://community.sinch.com/t5/Developer-Forum/Unexpected-JSON-received-by-SMS-delivery-report-hook-and-no/m-p/15158#M77</link>
      <description>&lt;P&gt;The main part of my question was that the JSON format and content of the delivery report webhook for "&lt;SPAN&gt;recipient_delivery_report_sms"&amp;nbsp;&lt;/SPAN&gt;suddenly didnt match the documents.&amp;nbsp; &amp;nbsp; What JSON format should I expect going forward for the delivery report webhook - the format I received recently and posted above -or- the one documented that contains a statuses array???&lt;/P&gt;&lt;P&gt;I have already refactored my code to validate the client_reference field to be sure it's what I expect and not to rely on it so that is not an issue for me.&amp;nbsp; The JSON to expect in the delivery report hook is an issue.&lt;/P&gt;</description>
      <pubDate>Tue, 30 Apr 2024 13:51:51 GMT</pubDate>
      <guid>https://community.sinch.com/t5/Developer-Forum/Unexpected-JSON-received-by-SMS-delivery-report-hook-and-no/m-p/15158#M77</guid>
      <dc:creator>SARoadrunners</dc:creator>
      <dc:date>2024-04-30T13:51:51Z</dc:date>
    </item>
    <item>
      <title>Re: Unexpected JSON received by SMS delivery report hook and no client_reference when send had one.</title>
      <link>https://community.sinch.com/t5/Developer-Forum/Unexpected-JSON-received-by-SMS-delivery-report-hook-and-no/m-p/15160#M78</link>
      <description>&lt;P&gt;Hi Jim, the sample you got matches the documentation for recipient delivery report&amp;nbsp;&lt;A href="https://developers.sinch.com/docs/sms/api-reference/sms/tag/Webhooks/#tag/Webhooks/operation/deliveryReport" target="_blank" rel="noopener"&gt;https://developers.sinch.com/docs/sms/api-reference/sms/tag/Webhooks/#tag/Webhooks/operation/deliveryReport&lt;/A&gt;. This is the format expected when `&lt;SPAN&gt;type` is set to `recipient_delivery_report_sms`.&amp;nbsp; As a rule, when &lt;CODE&gt;type&lt;/CODE&gt; is set to &lt;CODE&gt;delivery_report_sms&lt;/CODE&gt; you will get the JSON with the statuses array.&amp;nbsp; We would recommend for you or your team to double check the value of the &lt;CODE&gt;delivery_report&lt;/CODE&gt; parameter. It will be a recipient delivery report when it is set to &lt;CODE&gt;per_recipient&lt;/CODE&gt; or &lt;CODE&gt;per_recipient_final&lt;/CODE&gt;. Apologies for any confusion caused.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Apr 2024 14:38:14 GMT</pubDate>
      <guid>https://community.sinch.com/t5/Developer-Forum/Unexpected-JSON-received-by-SMS-delivery-report-hook-and-no/m-p/15160#M78</guid>
      <dc:creator>Alexander_Mair</dc:creator>
      <dc:date>2024-04-30T14:38:14Z</dc:date>
    </item>
    <item>
      <title>Re: Unexpected JSON received by SMS delivery report hook and no client_reference when send had one.</title>
      <link>https://community.sinch.com/t5/Developer-Forum/Unexpected-JSON-received-by-SMS-delivery-report-hook-and-no/m-p/15161#M79</link>
      <description>&lt;P&gt;That helps alot!&amp;nbsp; I am using per_recipient_final in my send request.&amp;nbsp; &amp;nbsp;When I moved my code from a simple stand alone app into my much larger production code, I must have inadvertently change the delivery_report.&amp;nbsp; My mistake.&amp;nbsp; Thanks for your help.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Apr 2024 14:48:26 GMT</pubDate>
      <guid>https://community.sinch.com/t5/Developer-Forum/Unexpected-JSON-received-by-SMS-delivery-report-hook-and-no/m-p/15161#M79</guid>
      <dc:creator>SARoadrunners</dc:creator>
      <dc:date>2024-04-30T14:48:26Z</dc:date>
    </item>
    <item>
      <title>Re: Unexpected JSON received by SMS delivery report hook and no client_reference when send had one.</title>
      <link>https://community.sinch.com/t5/Developer-Forum/Unexpected-JSON-received-by-SMS-delivery-report-hook-and-no/m-p/15176#M80</link>
      <description>&lt;P&gt;FWIW I also now have the client_reference working.&amp;nbsp; In the process of integrating code our Database admin changed the data type of the value I was putting into the client_reference from string to binary.&amp;nbsp; The binary value evaluated to 1 or true.&amp;nbsp; Once I adapted to the data change, your handing of client_reference worked as expected.&amp;nbsp; My team's mistake again.&lt;/P&gt;</description>
      <pubDate>Wed, 01 May 2024 18:55:16 GMT</pubDate>
      <guid>https://community.sinch.com/t5/Developer-Forum/Unexpected-JSON-received-by-SMS-delivery-report-hook-and-no/m-p/15176#M80</guid>
      <dc:creator>SARoadrunners</dc:creator>
      <dc:date>2024-05-01T18:55:16Z</dc:date>
    </item>
  </channel>
</rss>

