I am trying to create a simple web check to receive a delivery receipt from the Nexmo SMS service. This was the only documentation on their website.
During account set-up, you will be asked to supply Nexmo a CallBack URL for Delivery Receipt to which we will send a delivery receipt for each of your SMS submissions. This will confirm whether your message reached the recipient handset. The request parameters are sent via a GET (default) to your Callback URL and Nexmo will be expecting response 200 OK response, or it will keep retrying until the Delivery Receipt expires (up to 72 hours).
I have been looking for ways to do this, and so far I have this method from an example that I found on the Internet, although I'm not sure if this is correct. In any case, is this running on ASP.NET and on port 6563, as well as the port that I should listen to? I downloaded an application called ngrok, which should open my local web server on the Internet, so I ran the application and gave it a command to listen on port 6563, but no luck. I was messing with him, trying to find something to post this feature.
[HttpPost] public ActionResult CallbackURL() { System.IO.StreamReader reader = new System.IO.StreamReader(HttpContext.Request.InputStream); string rawSendGridJSON = reader.ReadToEnd(); return new HttpStatusCodeResult(200); }
Usually I can call the function directly to return the view, simply by visiting http://localhost:6563/Home/Index/CallbackURL So I inserted a breakpoint in the method signature, but it will only be called if I remove [HttpPost] from it. Any next steps I should try?
source share