{"id":120,"date":"2022-09-17T10:58:38","date_gmt":"2022-09-17T10:58:38","guid":{"rendered":"https:\/\/infobip.com\/developers\/?p=120"},"modified":"2023-09-11T14:35:12","modified_gmt":"2023-09-11T14:35:12","slug":"how-to-receive-sms-delivery-reports-with-php-and-infobip","status":"publish","type":"post","link":"https:\/\/www.infobip.com\/developers\/blog\/how-to-receive-sms-delivery-reports-with-php-and-infobip","title":{"rendered":"How to receive SMS delivery reports with PHP and Infobip \u00a0"},"content":{"rendered":"\n<img decoding=\"async\" src=\"https:\/\/img.shields.io\/badge\/php-%3E%3D7.2-blue\" alt=\"php\"\/>\n\n\n\n<p>As an outcome of this guide, you will receive a Delivery Report of a sent SMS using Infobip SMS API and an online free webhook tool. Once configured, for every SMS sent, you will get a delivery notification sent real-time to an endpoint you have specified for that SMS.<\/p>\n\n\n\n<p>This guide assumes that you already know how to send an SMS with Infobip API. For more details, see: <a href=\"https:\/\/infobip.com\/developers\/2022\/09\/17\/how-to-send-sms-with-php-and-infobip\/\" target=\"_blank\" rel=\"noopener\">How to send SMS with PHP and Infobip<\/a>.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Prerequisites<\/h2>\n\n\n\n<p>\u2022 <a href=\"https:\/\/www.infobip.com\/signup\" target=\"_blank\" rel=\"noopener\">Infobip account<\/a><\/p>\n\n\n\n<p>\u2022 PHP, version 7.2 or greater<\/p>\n\n\n\n<p>\u2022 a webhook that will listen to incoming events<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Difficulty level<\/h2>\n\n\n\n<p>This guide assumes very basic knowledge of Python and basic familiarity with APIs. It is important, however, that you are familiar with the webhook technology and know how to use it for this project.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Summary of the steps<\/h2>\n\n\n\n<p>\u2022 Send an SMS with the URL to your webhook specified in the payload.<br>\u2022&nbsp;Set up a webhook.<br>\u2022 Receive a Delivery Report in real time on to the previously provided URL.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Send SMS with a Notify URL<\/h2>\n\n\n\n<p>To receive reports about the progress of an SMS and its ultimate delivery status, Infobip will send a webhook with JSON payload to any URL you provide. This is called the notify URL, and it is passed on to the message sent. It can be the same for every message or be set dynamically for each message, depending on your needs.<\/p>\n\n\n\n<p>Using the example of <a href=\"https:\/\/infobip.com\/developers\/2022\/09\/17\/how-to-send-sms-with-php-and-infobip\/\" target=\"_blank\" rel=\"noopener\">Sending an SMS Message<\/a>, this is how you can add a Notify URL and receive status reports.<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-php\" data-lang=\"PHP\"><code>&lt;?php\n\nuse InfobipAPISendSMSApi;\nuse InfobipModel{ SmsDestination, SmsTextualMessage, SmsAdvancedTextualRequest};\n\n$sendSmsApi = new SendSMSApi($client, $configuration);\n$destination = (new SmsDestination())-&gt;setTo(&#39;445555555555&#39;);\n\n$message = (new SmsTextualMessage())\n    -&gt;setFrom(&#39;InfoSMS&#39;)\n    -&gt;setText(&#39;This is a dummy SMS message sent using infobip-api-php-client&#39;)\n    -&gt;setDestinations([$destination])\n    # This is the important bit \ud83d\udc47\n    -&gt;setNotifyUrl(&#39;https:\/\/yourwebsite.com\/whatever\/you\/like&#39;);\n\n$request = (new SmsAdvancedTextualRequest())\n    -&gt;setMessages([$message]);\n\ntry {\n    $smsResponse = $sendSmsApi-&gt;sendSmsMessage($request);\n    var_dump($smsResponse);\n} catch (Throwable $apiException) {\n    var_dump($apiException);\n}<\/code><\/pre><\/div>\n\n\n\n<p>Shortly after the PHP code runs, the URL <a href=\"https:\/\/yourwebsite.com\/whatever\/you\/like\">https:\/\/yourwebsite.com\/whatever\/you\/like<\/a> should receive a webhook that contains JSON looking like this:<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-json\" data-lang=\"JSON\"><code>{\n  &quot;results&quot;: [\n    {\n      &quot;price&quot;: {\n        &quot;pricePerMessage&quot;: 0.0,\n        &quot;currency&quot;: &quot;EUR&quot;\n      },\n      &quot;status&quot;: {\n        &quot;id&quot;: 5,\n        &quot;groupId&quot;: 3,\n        &quot;groupName&quot;: &quot;DELIVERED&quot;,\n        &quot;name&quot;: &quot;DELIVERED_TO_HANDSET&quot;,\n        &quot;description&quot;: &quot;Message delivered to handset&quot;\n      },\n      &quot;error&quot;: {\n        &quot;id&quot;: 0,\n        &quot;name&quot;: &quot;NO_ERROR&quot;,\n        &quot;description&quot;: &quot;No Error&quot;,\n        &quot;groupId&quot;: 0,\n        &quot;groupName&quot;: &quot;OK&quot;,\n        &quot;permanent&quot;: false\n      },\n      &quot;messageId&quot;: &quot;35107540824763357907&quot;,\n      &quot;doneAt&quot;: &quot;2022-04-27T16:03:33.291+0000&quot;,\n      &quot;smsCount&quot;: 1,\n      &quot;sentAt&quot;: &quot;2022-04-27T16:03:28.372+0000&quot;,\n      &quot;to&quot;: &quot;445555555555&quot;\n    }\n  ]\n}<\/code><\/pre><\/div>\n\n\n\n<p>Looks like the delivery worked nicely! No errors, and the status does not contain any suggested actions to fix a problem. To learn more about what other possible statuses and error codes you may catch on your webhook, check out <a href=\"https:\/\/www.infobip.com\/docs\/essentials\/response-status-and-error-codes\" target=\"_blank\" rel=\"noopener\">Infobip documentation<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Read a webhook<\/h2>\n\n\n\n<p>Seeing as the webhook is an HTTP request with a JSON body, it can be read by the code at the notify URL with something like this:<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-php\" data-lang=\"PHP\"><code>$json = file_get_contents(&#39;php:\/\/input&#39;);\n$data = json_decode($json, true);\n\nforeach ($data[&#39;results&#39;] as $result) {\n  error_log(&quot;{$result[&#39;messageId&#39;]} was done at {$result[&#39;doneAt&#39;]} with status {$result[&#39;status&#39;][&#39;groupName&#39;]}&quot;);\n}<\/code><\/pre><\/div>\n\n\n\n<p>If you were to call this file <code>notify-url.php<\/code> and run <code>php -S localhost:8088<\/code> a local server would be able to parse any incoming JSON and output messages to the server logs with <code>error_log()<\/code>. You would instead want to store the results in the database, or update some of your own records, etc., but that&#8217;s all missing a step.<\/p>\n\n\n\n<p>How do we get Infobip to communicate with code running on localhost?<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Intercept webhooks for development<\/h2>\n\n\n\n<p>If we set the URL to <code>https:\/\/&lt;your-server&gt;\/webhooks\/infobip<\/code>, then the code would need to be in production before it&#8217;s tested, which isn&#8217;t ideal. We need to find a way to get traffic coming from Infobip to something we can control.<\/p>\n\n\n\n<p>There are two convenient ways to do that.<\/p>\n\n\n\n<p>\u2022 Hook Relay &#8211; a freemium-hosted webhook inspection\/relay service.<br>\u2022 ngrok &#8211; an open-source CLI solution that can proxy HTTP(S) traffic to your local machine.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Intercept webhooks with Hook Relay<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Sign up for a free Hook Relay account with GitHub or GitLab, and click &#8220;New Hook&#8221;.<\/li>\n\n\n\n<li>Name it something like &#8220;Infobip SMS Reports&#8221; and copy the URL they give you.<\/li>\n\n\n\n<li>Hook Relay will give a long unique URL that can be copied for use as a notify URL.<\/li>\n<\/ol>\n\n\n\n<p>Once you have this URL, pass it to <code>SmsTextualMessage<\/code> with the <code>setNotifyUrl(string)<\/code> method.<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-php\" data-lang=\"PHP\"><code>$message = (new SmsTextualMessage())\n    -&gt;setFrom(&#39;InfoSMS&#39;)\n    -&gt;setText(&#39;This is a dummy SMS message sent using infobip-api-php-client&#39;)\n    -&gt;setDestinations([$destination])\n    -&gt;setNotifyUrl(&#39;https:\/\/api.hookrelay.dev\/hooks\/&lt;your-unique-hook&gt;&#39;);<\/code><\/pre><\/div>\n\n\n\n<p>A few moments after this has run, Hook Relay should let you know it has received a &#8220;delivery&#8221; for you. It&#8217;s subtle, it says &#8220;1 new delivery click to refresh&#8221; and click on the ID of the delivery, which will contain all the information about the message that was just sent.<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-json\" data-lang=\"JSON\"><code>{\n  &quot;results&quot;: [\n    {\n      &quot;price&quot;: {\n        &quot;pricePerMessage&quot;: 0.0,\n        &quot;currency&quot;: &quot;EUR&quot;\n      },\n      &quot;status&quot;: {\n        &quot;id&quot;: 5,\n        &quot;groupId&quot;: 3,\n        &quot;groupName&quot;: &quot;DELIVERED&quot;,\n        &quot;name&quot;: &quot;DELIVERED_TO_HANDSET&quot;,\n        &quot;description&quot;: &quot;Message delivered to handset&quot;\n      },\n      &quot;error&quot;: {\n        &quot;id&quot;: 0,\n        &quot;name&quot;: &quot;NO_ERROR&quot;,\n        &quot;description&quot;: &quot;No Error&quot;,\n        &quot;groupId&quot;: 0,\n        &quot;groupName&quot;: &quot;OK&quot;,\n        &quot;permanent&quot;: false\n      },\n      &quot;messageId&quot;: &quot;35770713228903571979&quot;,\n      &quot;doneAt&quot;: &quot;2022-07-13T10:12:22.906+0000&quot;,\n      &quot;smsCount&quot;: 1,\n      &quot;sentAt&quot;: &quot;2022-07-13T10:12:12.295+0000&quot;,\n      &quot;to&quot;: &quot;447415774432&quot;\n    }\n  ]\n}<\/code><\/pre><\/div>\n\n\n\n<p>The &#8220;Copy as cURL&#8221; is also pretty useful, because you can use that to simulate the request that came from Infobip, meaning you can write code in your development environment, then use the cURL command to check your code is responding properly.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Intercept webhooks with ngrok<\/h3>\n\n\n\n<p>Install ngrok on your development machine, then run a PHP server from the directory where that <code>notify-url.php<\/code> code is sitting.<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>php -S localhost:8088<\/code><\/pre><\/div>\n\n\n\n<p>In another CLI session, start up ngrok and point it at that server:<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>ngrok http http:\/\/localhost:8088\/<\/code><\/pre><\/div>\n\n\n\n<p>The output should look like this:<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>Session Status                online\nSession Expires               1 hour, 59 minutes\nTerms of Service              https:\/\/ngrok.com\/tos\nVersion                       3.0.3\nRegion                        Europe (eu)\nLatency                       calculating...\nWeb Interface                 http:\/\/127.0.0.1:4040\nForwarding                    https:\/\/972c-46-234-226-56.eu.ngrok.io -&gt; http:\/\/localhost:8088\/<\/code><\/pre><\/div>\n\n\n\n<p>Taking that forwarding URL, we can append the name of our PHP file:<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-php\" data-lang=\"PHP\"><code>$message = (new SmsTextualMessage())\n    -&gt;setFrom(&#39;InfoSMS&#39;)\n    -&gt;setText(&#39;This is a dummy SMS message sent using infobip-api-php-client&#39;)\n    -&gt;setDestinations([$destination])\n    -&gt;setNotifyUrl(&#39;https:\/\/972c-46-234-226-56.eu.ngrok.io\/notify-url.php&#39;);<\/code><\/pre><\/div>\n\n\n\n<p>Now when you send a PHP command, you should see this in your php web server logs:<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-php\" data-lang=\"PHP\"><code>[Wed Apr 27 19:18:51 2022] 35107992905443344689 was done at 2022-04-27T17:18:51.896+0000 with status DELIVERED<\/code><\/pre><\/div>\n\n\n\n<p>This works just as well with Laravel, Slim, Symfony, etc, just put the code into a controller and use the route instead of the filename in the URL.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Protect against webhook spam<\/h2>\n\n\n\n<p>If you want to protect your endpoints from spam, you can use our IP addresses to whitelist the traffic from the Infobip platform. Check out the <a href=\"https:\/\/www.infobip.com\/docs\/essentials\/ip-address-safelist\" target=\"_blank\" rel=\"noopener\">safelist of IP addresses<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>As an outcome of this guide, you will receive [&hellip;]<\/p>\n","protected":false},"author":10,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_import_markdown_pro_load_document_selector":0,"_import_markdown_pro_submit_text_textarea":"","footnotes":""},"categories":[12,255,15,264],"tags":[46,76],"coauthors":[133],"class_list":["post-120","post","type-post","status-publish","format-standard","hentry","category-guide","category-infobip-products","category-php","category-sms","tag-developer-docs","tag-sdk"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to receive SMS delivery reports with PHP and Infobip \u00a0 - Infobip Developers Hub<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.infobip.com\/developers\/blog\/how-to-receive-sms-delivery-reports-with-php-and-infobip\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to receive SMS delivery reports with PHP and Infobip \u00a0 - Infobip Developers Hub\" \/>\n<meta property=\"og:description\" content=\"As an outcome of this guide, you will receive [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.infobip.com\/developers\/blog\/how-to-receive-sms-delivery-reports-with-php-and-infobip\" \/>\n<meta property=\"og:site_name\" content=\"Infobip Developers Hub\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/infobip\/\" \/>\n<meta property=\"article:published_time\" content=\"2022-09-17T10:58:38+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-09-11T14:35:12+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/img.shields.io\/badge\/php-%3E%3D7.2-blue\" \/>\n<meta name=\"author\" content=\"Infobip Devs\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@InfobipDev\" \/>\n<meta name=\"twitter:site\" content=\"@InfobipDev\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Infobip Devs\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.infobip.com\/developers\/blog\/how-to-receive-sms-delivery-reports-with-php-and-infobip#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.infobip.com\/developers\/blog\/how-to-receive-sms-delivery-reports-with-php-and-infobip\"},\"author\":{\"name\":\"Infobip Devs\",\"@id\":\"https:\/\/www.infobip.com\/developers\/#\/schema\/person\/e04a9012051f81b6a2f6976e156f6ce0\"},\"headline\":\"How to receive SMS delivery reports with PHP and Infobip \u00a0\",\"datePublished\":\"2022-09-17T10:58:38+00:00\",\"dateModified\":\"2023-09-11T14:35:12+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.infobip.com\/developers\/blog\/how-to-receive-sms-delivery-reports-with-php-and-infobip\"},\"wordCount\":786,\"publisher\":{\"@id\":\"https:\/\/www.infobip.com\/developers\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.infobip.com\/developers\/blog\/how-to-receive-sms-delivery-reports-with-php-and-infobip#primaryimage\"},\"thumbnailUrl\":\"https:\/\/img.shields.io\/badge\/php-%3E%3D7.2-blue\",\"keywords\":[\"developer docs\",\"SDK\"],\"articleSection\":[\"Guide\",\"Infobip Products\",\"PHP\",\"SMS\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.infobip.com\/developers\/blog\/how-to-receive-sms-delivery-reports-with-php-and-infobip\",\"url\":\"https:\/\/www.infobip.com\/developers\/blog\/how-to-receive-sms-delivery-reports-with-php-and-infobip\",\"name\":\"How to receive SMS delivery reports with PHP and Infobip \u00a0 - Infobip Developers Hub\",\"isPartOf\":{\"@id\":\"https:\/\/www.infobip.com\/developers\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.infobip.com\/developers\/blog\/how-to-receive-sms-delivery-reports-with-php-and-infobip#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.infobip.com\/developers\/blog\/how-to-receive-sms-delivery-reports-with-php-and-infobip#primaryimage\"},\"thumbnailUrl\":\"https:\/\/img.shields.io\/badge\/php-%3E%3D7.2-blue\",\"datePublished\":\"2022-09-17T10:58:38+00:00\",\"dateModified\":\"2023-09-11T14:35:12+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.infobip.com\/developers\/blog\/how-to-receive-sms-delivery-reports-with-php-and-infobip#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.infobip.com\/developers\/blog\/how-to-receive-sms-delivery-reports-with-php-and-infobip\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.infobip.com\/developers\/blog\/how-to-receive-sms-delivery-reports-with-php-and-infobip#primaryimage\",\"url\":\"https:\/\/img.shields.io\/badge\/php-%3E%3D7.2-blue\",\"contentUrl\":\"https:\/\/img.shields.io\/badge\/php-%3E%3D7.2-blue\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.infobip.com\/developers\/blog\/how-to-receive-sms-delivery-reports-with-php-and-infobip#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.infobip.com\/developers\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to receive SMS delivery reports with PHP and Infobip \u00a0\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.infobip.com\/developers\/#website\",\"url\":\"https:\/\/www.infobip.com\/developers\/\",\"name\":\"Infobip Developers Hub\",\"description\":\"Build meaningful customer relationships across any channel\",\"publisher\":{\"@id\":\"https:\/\/www.infobip.com\/developers\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.infobip.com\/developers\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.infobip.com\/developers\/#organization\",\"name\":\"Infobip Developers Hub\",\"url\":\"https:\/\/www.infobip.com\/developers\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.infobip.com\/developers\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.infobip.com\/developers\/wp-content\/uploads\/2023\/03\/Infobip_logo_favicon.png\",\"contentUrl\":\"https:\/\/www.infobip.com\/developers\/wp-content\/uploads\/2023\/03\/Infobip_logo_favicon.png\",\"width\":696,\"height\":696,\"caption\":\"Infobip Developers Hub\"},\"image\":{\"@id\":\"https:\/\/www.infobip.com\/developers\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/infobip\/\",\"https:\/\/x.com\/InfobipDev\",\"https:\/\/www.youtube.com\/channel\/UCUPSTy53VecI5GIir3J3ZbQ\",\"https:\/\/github.com\/infobip-community\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.infobip.com\/developers\/#\/schema\/person\/e04a9012051f81b6a2f6976e156f6ce0\",\"name\":\"Infobip Devs\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.infobip.com\/developers\/#\/schema\/person\/image\/f61078713800c4e479dce745cd206b82\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/f29655934347a5aa15879f9af9ac1f05b87167e0f7ed4074a04132eaa9f631c4?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/f29655934347a5aa15879f9af9ac1f05b87167e0f7ed4074a04132eaa9f631c4?s=96&d=mm&r=g\",\"caption\":\"Infobip Devs\"},\"url\":\"https:\/\/www.infobip.com\/developers\/blog\/author\/infobip-devs\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to receive SMS delivery reports with PHP and Infobip \u00a0 - Infobip Developers Hub","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.infobip.com\/developers\/blog\/how-to-receive-sms-delivery-reports-with-php-and-infobip","og_locale":"en_US","og_type":"article","og_title":"How to receive SMS delivery reports with PHP and Infobip \u00a0 - Infobip Developers Hub","og_description":"As an outcome of this guide, you will receive [&hellip;]","og_url":"https:\/\/www.infobip.com\/developers\/blog\/how-to-receive-sms-delivery-reports-with-php-and-infobip","og_site_name":"Infobip Developers Hub","article_publisher":"https:\/\/www.facebook.com\/infobip\/","article_published_time":"2022-09-17T10:58:38+00:00","article_modified_time":"2023-09-11T14:35:12+00:00","og_image":[{"url":"https:\/\/img.shields.io\/badge\/php-%3E%3D7.2-blue","type":"","width":"","height":""}],"author":"Infobip Devs","twitter_card":"summary_large_image","twitter_creator":"@InfobipDev","twitter_site":"@InfobipDev","twitter_misc":{"Written by":"Infobip Devs","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.infobip.com\/developers\/blog\/how-to-receive-sms-delivery-reports-with-php-and-infobip#article","isPartOf":{"@id":"https:\/\/www.infobip.com\/developers\/blog\/how-to-receive-sms-delivery-reports-with-php-and-infobip"},"author":{"name":"Infobip Devs","@id":"https:\/\/www.infobip.com\/developers\/#\/schema\/person\/e04a9012051f81b6a2f6976e156f6ce0"},"headline":"How to receive SMS delivery reports with PHP and Infobip \u00a0","datePublished":"2022-09-17T10:58:38+00:00","dateModified":"2023-09-11T14:35:12+00:00","mainEntityOfPage":{"@id":"https:\/\/www.infobip.com\/developers\/blog\/how-to-receive-sms-delivery-reports-with-php-and-infobip"},"wordCount":786,"publisher":{"@id":"https:\/\/www.infobip.com\/developers\/#organization"},"image":{"@id":"https:\/\/www.infobip.com\/developers\/blog\/how-to-receive-sms-delivery-reports-with-php-and-infobip#primaryimage"},"thumbnailUrl":"https:\/\/img.shields.io\/badge\/php-%3E%3D7.2-blue","keywords":["developer docs","SDK"],"articleSection":["Guide","Infobip Products","PHP","SMS"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.infobip.com\/developers\/blog\/how-to-receive-sms-delivery-reports-with-php-and-infobip","url":"https:\/\/www.infobip.com\/developers\/blog\/how-to-receive-sms-delivery-reports-with-php-and-infobip","name":"How to receive SMS delivery reports with PHP and Infobip \u00a0 - Infobip Developers Hub","isPartOf":{"@id":"https:\/\/www.infobip.com\/developers\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.infobip.com\/developers\/blog\/how-to-receive-sms-delivery-reports-with-php-and-infobip#primaryimage"},"image":{"@id":"https:\/\/www.infobip.com\/developers\/blog\/how-to-receive-sms-delivery-reports-with-php-and-infobip#primaryimage"},"thumbnailUrl":"https:\/\/img.shields.io\/badge\/php-%3E%3D7.2-blue","datePublished":"2022-09-17T10:58:38+00:00","dateModified":"2023-09-11T14:35:12+00:00","breadcrumb":{"@id":"https:\/\/www.infobip.com\/developers\/blog\/how-to-receive-sms-delivery-reports-with-php-and-infobip#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.infobip.com\/developers\/blog\/how-to-receive-sms-delivery-reports-with-php-and-infobip"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.infobip.com\/developers\/blog\/how-to-receive-sms-delivery-reports-with-php-and-infobip#primaryimage","url":"https:\/\/img.shields.io\/badge\/php-%3E%3D7.2-blue","contentUrl":"https:\/\/img.shields.io\/badge\/php-%3E%3D7.2-blue"},{"@type":"BreadcrumbList","@id":"https:\/\/www.infobip.com\/developers\/blog\/how-to-receive-sms-delivery-reports-with-php-and-infobip#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.infobip.com\/developers\/"},{"@type":"ListItem","position":2,"name":"How to receive SMS delivery reports with PHP and Infobip \u00a0"}]},{"@type":"WebSite","@id":"https:\/\/www.infobip.com\/developers\/#website","url":"https:\/\/www.infobip.com\/developers\/","name":"Infobip Developers Hub","description":"Build meaningful customer relationships across any channel","publisher":{"@id":"https:\/\/www.infobip.com\/developers\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.infobip.com\/developers\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.infobip.com\/developers\/#organization","name":"Infobip Developers Hub","url":"https:\/\/www.infobip.com\/developers\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.infobip.com\/developers\/#\/schema\/logo\/image\/","url":"https:\/\/www.infobip.com\/developers\/wp-content\/uploads\/2023\/03\/Infobip_logo_favicon.png","contentUrl":"https:\/\/www.infobip.com\/developers\/wp-content\/uploads\/2023\/03\/Infobip_logo_favicon.png","width":696,"height":696,"caption":"Infobip Developers Hub"},"image":{"@id":"https:\/\/www.infobip.com\/developers\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/infobip\/","https:\/\/x.com\/InfobipDev","https:\/\/www.youtube.com\/channel\/UCUPSTy53VecI5GIir3J3ZbQ","https:\/\/github.com\/infobip-community"]},{"@type":"Person","@id":"https:\/\/www.infobip.com\/developers\/#\/schema\/person\/e04a9012051f81b6a2f6976e156f6ce0","name":"Infobip Devs","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.infobip.com\/developers\/#\/schema\/person\/image\/f61078713800c4e479dce745cd206b82","url":"https:\/\/secure.gravatar.com\/avatar\/f29655934347a5aa15879f9af9ac1f05b87167e0f7ed4074a04132eaa9f631c4?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/f29655934347a5aa15879f9af9ac1f05b87167e0f7ed4074a04132eaa9f631c4?s=96&d=mm&r=g","caption":"Infobip Devs"},"url":"https:\/\/www.infobip.com\/developers\/blog\/author\/infobip-devs"}]}},"_links":{"self":[{"href":"https:\/\/www.infobip.com\/developers\/wp-json\/wp\/v2\/posts\/120","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.infobip.com\/developers\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.infobip.com\/developers\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.infobip.com\/developers\/wp-json\/wp\/v2\/users\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/www.infobip.com\/developers\/wp-json\/wp\/v2\/comments?post=120"}],"version-history":[{"count":5,"href":"https:\/\/www.infobip.com\/developers\/wp-json\/wp\/v2\/posts\/120\/revisions"}],"predecessor-version":[{"id":2054,"href":"https:\/\/www.infobip.com\/developers\/wp-json\/wp\/v2\/posts\/120\/revisions\/2054"}],"wp:attachment":[{"href":"https:\/\/www.infobip.com\/developers\/wp-json\/wp\/v2\/media?parent=120"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.infobip.com\/developers\/wp-json\/wp\/v2\/categories?post=120"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.infobip.com\/developers\/wp-json\/wp\/v2\/tags?post=120"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.infobip.com\/developers\/wp-json\/wp\/v2\/coauthors?post=120"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}