New call-to-action
Results 1 to 8 of 8

Thread: twilio

  1. #1
    Member
    Real Name
    Terry Morgan
    Join Date
    Nov 2014
    Location
    Essex, England
    Posts
    309

    Default twilio

    I am trying to use twilio for the first time but the following code always says success but no text is received & nothing happens on my trial account:-

    dim vresult as l
    dim vresponse as p
    vsendto = ""
    vmessage = ""
    vnamedresource = ""
    vfrom = ""
    vaccountSID = ""
    vauthcode = ""

    vresult = .f.
    'vresponse = ""
    vsendto = "my personal uk mobile no including +44"
    vmessage = "Test Message from Me"
    vnamedresource = ""
    vfrom = "my trial uk no. from twillio"
    vaccountSID = "my trial account SID copied & pasted"
    vauthcode = "my trial account auth token copied & pasted"

    vresult = twilio_send_sms(vresponse,vsendto,vmessage,vnamedresource,vfrom,vaccountSID,vauthcode)

    if vresult = .t.
    ui_msg_box("Text Message","Success",UI_OK)
    else
    ui_msg_box("Text Message","Failure",UI_OK)
    ui_msg_box("Text Message Response",vresponse,UI_OK)
    end if

    where am i going wrong it all looked so simple.

    Thanks
    Terry

  2. #2
    Member
    Real Name
    Jon P Moody
    Join Date
    Nov 2016
    Posts
    207

    Default Re: twilio

    Terry,

    Add
    Code:
    showvarscript(vresponse, "" + vresult)
    after submitting the sms to see what twilio returns.

  3. #3
    Member
    Real Name
    Terry Morgan
    Join Date
    Nov 2014
    Location
    Essex, England
    Posts
    309

    Default Re: twilio

    This was the result
    DIM headers as C
    DIM contents as C = "{"code": 20404, "message": "The requested resource /2010-04-01/Accounts/accountSID = AC481b3619f670dc60b4db0fc11df50e69/Messages.json was not found", "more_info": "https://www.twilio.com/docs/errors/20404", "status": 404}"
    Thanks

  4. #4
    Member
    Real Name
    Jon P Moody
    Join Date
    Nov 2016
    Posts
    207

    Default Re: twilio

    Looks like twiliko doesn't like how you've passed the account SID. This should just be a string of what looks like hex characters. No "accountSID =" in front of it.

    Off for my breakfast now!

  5. #5
    Member
    Real Name
    Terry Morgan
    Join Date
    Nov 2014
    Location
    Essex, England
    Posts
    309

    Default Re: twilio

    Got it working now.
    Thanks

  6. #6
    "Certified" Alphaholic Ted Giles's Avatar
    Real Name
    Ted Giles
    Join Date
    Aug 2000
    Location
    In the Wolds, Louth, Lincolnshire, UK
    Posts
    4,490

    Default Re: twilio

    Yep, so did you get your hide button working?
    Ted Giles
    Example Consulting - UK
    .

    http://ec12.example-software.com//
    See our site for Alpha Support, Conversion and Upgrade.

  7. #7
    Member
    Real Name
    Terry Morgan
    Join Date
    Nov 2014
    Location
    Essex, England
    Posts
    309

    Default Re: twilio

    Ted
    I managed to get the buttons name using .active(), but using the name in a variable would not hide the button. In the end named all the buttons specifically & used their proper names with .hide() and that worked.
    Terry

  8. #8
    "Certified" Alphaholic Ted Giles's Avatar
    Real Name
    Ted Giles
    Join Date
    Aug 2000
    Location
    In the Wolds, Louth, Lincolnshire, UK
    Posts
    4,490

    Default Re: twilio

    You might have needed to set the Var to GLOBAL as opposed to SHARED.
    Still, you are on the way to your 2nd $ Million!
    Ted Giles
    Example Consulting - UK
    .

    http://ec12.example-software.com//
    See our site for Alpha Support, Conversion and Upgrade.

Similar Threads

  1. Twilio receiving message help.
    By reed@medbillit.com in forum Mobile & Browser Applications
    Replies: 3
    Last Post: 12-22-2019, 11:35 AM
  2. Twilio and alpha five - happy together
    By GGandhi in forum Announcements
    Replies: 0
    Last Post: 03-18-2017, 06:35 AM
  3. Sending SMS with SMS Twilio Action
    By ydbrown in forum Mobile & Browser Applications
    Replies: 21
    Last Post: 02-27-2017, 08:07 PM
  4. Twilio Integration
    By JohnFabrega in forum General Questions
    Replies: 12
    Last Post: 04-24-2014, 12:09 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •