What can I use as a blank Request URL for Sms? - sms

In order for a number to receive Sms messages, it appears I must enter a value for the Request URL associated with the number. However I do not need to notified of messages in a callback. I'm wondering what value I can put in here that will basically do nothing but still allow me to retrieving messages via the polling mechanism?
Thanks,
Dan

Twilio developer evangelist here.
You can use a URL that responds with an empty <Response> TwiML element. If you don't have a server to host that on, you could use http://twimlets.com. This link ought to do the trick:
http://twimlets.com/echo?Twiml=%3CResponse%3E%3C%2FResponse%3E&

Related

Alternatives of MQJExplorer tool for capturing request and sending response

I have an application which uses IBM MQ to send out the request in a queue manager to a particular system B.
The response corresponding to that request is then received back from system B by the application in a sync call and then further business processing happens.
Since we are working on the offshore region, we do not actually send out the request to system B but rather capture it ourselves using the MQJExplorer tool and send back the response, which kind of simulates the prod. behaviour.
The problem here is, or i would say, the overhead is that we have to manually open the mqjexplorer tool, check the request, take a particular attribute from the request(lets say ID), and send back ID+1 so that the application recognizes the response is for ID-1 request.
I would like to know if this particular thing can be automated, with some other tool, where i can define like whenever any such kind of request is received in for eg: MQ001 queue manager and its REQ queue, just extract the ID attribute, do a ID+1 and send back the response in RESP queue of same qm.
There are a pair of IBM supplied samples that come with IBM MQ:-
amqsreq0.c - Sample C program that puts request messages to a message queue and shows the replies (example using REPLY queue)
amqsecha.c - Sample C program - echo messages to reply to queue
They are supplied to allow you to try out a request/reply application.
You already have the equivalent app to do the job that amqsreq0.c does, and you could adapt amqsecha.c to extract your ID attribute, increment it, and then the sample already has the code to send the reply back.
It can be automated by running as a triggered application too.
If 'C' language is not your thing and prefer Java then have a read of a blog posting I did in 2017. It is a complete request/reply scenario with 2 applications: BEServer01.java and RQClient01.java
You can modify BEServer01.java to your liking (and remove the SQL code). BEServer01.java contains all of the code for getting a request message and sending a reply message. Simply replace the variable 'replyText' contents with the reply message that you want.
If you are not a programmer then there is another option but it does not modify the message contents. MQ Visual Edit has a component called: SIM Server. Its purpose is to simulate a server-side component. You configure what 'request' queue to get the messages from and what the reply message text will be. When a messages lands on the request queue, the SIM Server will retrieve it and send the reply message to the queue & queue manager specified in the MQMD's ReplyToQueueName and ReplyToQueueManagerName fields.

How to pass from and body as parameters in Twilio SMS webhook URL

I have a Twilio SMS number configured to send a request to a WebServer via a Webhook URL. What I am trying to understand is can I pass the 'from' phone number and 'SMS body' as parameters in the Webhook URL?
For example:
https://myserver/v1/sms?phoneNo='FROM'&message='MSG'
I understand I can extract this information from the Body on the server but this would require additional coding, testing, deployment etc... on the web server.
Thanks.
Keep the URL as https://myserver/v1/sms (Twilio will add the parameters for you when it makes the request)
To the right of the webhook url field, change in the drop-down from HTTP POST to HTTP GET
Save
With this configuration, Twilio will send the parameters with its request as URL query parameters.
The names for the two parameters mentioned in your question are
From (The phone number that sent the message) and
Body (The text body of the message.).
Other parameters are: MessageSid, SmsSid, AccountSid, MessagingServiceSid, To, NumMedia
You can read more here: https://www.twilio.com/docs/sms/twiml#twilios-request-to-your-application
If you'd like to have your own names for the GET parameters
then, probably the easiest would be to use Twilio Studio with a HTTP REQUEST widget and configure the phone number with Studio Flow instead of Webhook.
The HTTP REQUEST will let you make a GET request and add your own parameters to it.
For the values you would use {{trigger.message.From}} for your phoneNo and {{trigger.message.Body}} for your message.
You can read more about Twilio Studio's widgets here: https://www.twilio.com/docs/studio/widget-library#http-request

Error when I send email SparkPost

First the "email send" works fine but now It doesn't work anymore and when I print the error this is the text:
ERRORE {"name":"SparkPostError","errors":[{"message":"Message generation rejected","description":"Exceed Sending Limit (sandbox)","code":"1902"}],"statusCode":400}
Anyone can explein me how I'm wroing?
This error says that you have reached the limit of messages sent from sparkpostbox.com and now must register your own sending domain. You can read about how to do that here.
Each new SparkPost account may send a fixed number of messages addressed 'From:' sparkpostbox.com. After that, the idea is that you register your own sending domain and send from that instead.
The sandbox options allows you to send using the #sparkpostbox.com domain. It is currently limited to 50 sends for the lifetime of the account. At this time you should have a verified sending domain to use going forward. If you are looking for information on testing using SparkPost, take a look at this support document: https://support.sparkpost.com/customer/portal/articles/2361300
Source of the answer for your question is there: Error "Fatal SparkPostError: Exceed Sending Limit" when sandbox=true

"A From phone number is required” in JSON call to Twilio

we are trying to implement the SMS function from Twilio to our 4D application. The phone number, SID, AuthKey and all required information I use in the tool of SOAPUI show me everything is working fine and I have received an SMS from Twilio. However, when I try to implement using the 4D platform, I have tried to use JSON to pass the From, To and Body as a request and the response come back say "A from phone number is required" Please see screenshot attached and I wanna know what I did wrong.
Succeed from SoapUI
Implement from 4D
Twilio developer evangelist here.
I don't personally know either SoapUI or 4D. But here's what I can see from your screenshots.
In SoapUI, you have the request Content-Type header set as application/x-www-form-urlencoded and it looks as though you are sending the body as form encoded parameters and that is why you get the correct response.
In 4D I can see you set the same header as application/x-www-form-urlencoded, but you then send the data as JSON. Twilio only accepts data in POST requests as form encoded key value pairs. As I don't know 4D, I can't tell you exactly how to fix it, but you do need to stop JSON encoding the data and send as form data instead.
Let me know if this helps.

Shopify webhook verification in parse

I am trying to get a shopify webhook to fill my customer class in parse.com, however something must go wrong. I don't know how to verify the parse response since Shopify sends this webhook out from it's ruby backend. I used requestbin to catch the webhook and I replicated a post request using postman to my parse url and everything works fine. Does anyone know how to debug requests like these? Is there a console in Parse where I can see all the incoming requests and the responses Parse.com sent back?
Try using Runscope for debugging webhooks. Full guide here: https://www.runscope.com/provider-guide/troubleshooting-webhooks - this is more than just a request bin. It's a full transparent proxy that will, like a bin, record the webhook notification, but will also pass it along to the intended destination (your webhook receiver) and record that response as well.

Resources