Thanks All, I have solved it. the trick ACCis that though the json above in the auth lines says
"username":
"password":
the values to put after them are not the twilio user name and password password, but the SID and Auth Key.
The correct json is therefore:
{
"eventName": "Switch1Trip",
"url": "https://api.twilio.com/2010-04-01/Accounts/MY TWILIO ACCOUNT SID/Messages",
"requestType": "POST",
"auth": {
"username": "MY TWILIO ACCOUNT SID",
"password": "MY TWILIO AUTH KEY"
},
"form": {
"From" : "TWILIO_PHONE_NUMBER",
"To" : "MY_PHONE_NUMBER",
"Body" : "Switch 1 tripped"
},
"mydevices": true
}