Twilio SMS API use

  1. last week
    Edited last week

    Hello,
    I try to use Twilio Api to send sms.
    I convert the desktop xojo example to a web app found there
    https://blog.xojo.com/2017/07/17/quick-tip-sending-text-messages-using-twilio/

    I see that the APi that is used have arelaese date back to2010.
    I try to use it with real number and get this error

    "{"code": 21606, "message": "The From phone number +3069mymobulenumber is not a valid, SMS-capable inbound phone number or short code for your account."

    Is there any more recent project that it might works or any newer xojo web examples or can anybody suggest modifications I can do in order to make it work?

    I found some in this forum but most projects does not exist anymore (the link is dead)
    Thank you in advance
    MB

  2. Paul L

    Dec 6 Xojo Inc http://docs.xojo.com

    I just used the example that is included with Xojo to send an SMS from Twilio:

    Examples/Communication/Internet/TwilioSMS

    I did have to go to my Twitter account and request a new Twilio phone number to use as the From phone number in the example app. I also had to make sure I used the ACCOUNT SID and AUTH TOKEN shown on the Dashboard and not the ones show on Settings. I don't know why there are different auth tokens and I could not get the test ACCOUNT SID to work.

    -image-

  3. 7 days ago

    Thanks Paul,
    So maybe i dud something wrong in setting up my Twilio account.
    I just opened an account and then i got a verification message to my phone.
    Do i have to declare in twilio my mobile number?

  4. Paul L

    Dec 6 Xojo Inc http://docs.xojo.com

    @Michael B Do i have to declare in twilio my mobile number?

    Yes, your mobile number does need to be verified before you can send to it.

    https://www.twilio.com/console/phone-numbers/verified

  5. Edited 7 days ago

    yes it is there in the "verified callers id" list.
    So, is there anything else i may missed?

  6. Paul L

    Dec 6 Xojo Inc http://docs.xojo.com

    I can't say. I went through the "curl" tutorial and it prompted me for the stuff I didn't have set up correctly. Once I could send an SMS with curl, I knew which values to use in the Xojo example and everything worked.

  7. Tim P

    Dec 6 Pre-Release Testers feedback://46303

    Since it sounds like a policy problem with Twilio, you'd probably get more useful support from them, not us. You got a response which means the Xojo code is working.

  8. Tim D

    Dec 6 Pre-Release Testers, Xojo Pro, XDC Speakers Richmond, VA

    @Michael B : Here's a Xojo console app that includes a very basic example of how to send an SMS via Twilio:

    https://s3.amazonaws.com/aloe-zone/downloads/twilio.xojo_binary_project.zip

    In the app.run event handler, set your Account SID, Auth Token, as well as the "From" and "To" phone numbers. Then run the app, and the SMS should be sent. If not, then look at the Response property of the Twilio class instance for info on what went wrong.

    Good luck!

  9. 6 days ago
    Edited 6 days ago

    Thank you all of you,
    I used a chilkat rest library and get the same results... so it might be a twilio policy regarding my country. I need to change country :-)

or Sign Up to reply!