You are browsing myClubhouse Knowledge Base

How to Set Up and Integrate with Twilio (send SMS text messages)

This article details what you need to do to link a Twilio text messaging account to myClubhouse so that you can send SMS text messages.  At the time of writing, Twilio typically charges USD $0.0400 to send an SMS text message and USD $0.0075 to receive within the UK (other countries supported). Details can be found here: https://www.twilio.com/sms/pricing/gb.

If your Twilio phone number is from a different country (has a different country code) to any of the mobile phone numbers stored for your users, the SMS text service will only work if you also store the country code with your users' mobile phone numbers in myClubhouse.

For example, to send text from a US mobile phone number (starting +1) to a UK mobile phone number (starting +44), the user’s UK phone number must be stored in the format “+447 …” instead of “07 …”. Spaces, brackets and hyphens are allowed.

Twilio trial accounts will only send SMS text messages to verified phone numbers. Upgrade your Twilio trial account to start sending to all users.

Step-by-step guide

  1. The first step is create an account on Twilio, if you haven't done so already. Go to  https://www.twilio.com/ and click the red "Sign Up" button in the top right-hand corner.

  2. Fill in the Sign Up form, here is an example:

     

  3. Click the red button “Start your free trial”.

  4. Solve the verification puzzle (if required).

  5. Go to your email account and click on the link to verify your email address.

  6. The link will take you to a Twilio verification page where you need to sign in with the details you just set up.

  7. Then enter your mobile phone number and click Verify:

     

  8. A verification code will be sent to your mobile phone by text. Enter the code.

  9. You will now be asked to following questions:

    1. “Do you write code?” - answer “No” as shown:

    2. “What are you here to do?” - answer “Get a Twilio number to use with a different service”.

    3. “Which service/company are you integrating Twilio into?” - answer “Other”.

    4. You will be taken to your dashboard which will look something like this.

       

  10. On the Twilio dashboard, copy the account SID using the copy button provided (circled):

     

  11. Now switch to a browser window and go to your myClubhouse website
    e.g. https://www.myClubhouse.co.uk/LittleWhingeingCricketClub
    and sign in as an administrator.

    1. Go to Admin > Settings > General Club Settings

    2. Scroll down to SMS (text) Messaging

    3. Paste the Twilio Account SID into the box provided as shown:

  12. Switch back to the Twilio website browser tab and copy the Twilio Auth Token from the dashboard using the button provided (circled):

  13. Switch back to your myClubhouse site tab and paste the Twilio Auth Token into the settings page:

    1. Save Changes.

  14. Switch back to your Twilio dashboard and click the red button “Get a Trial Number”:

    The free trial number will probably be a US number. You can choose this number or search for another number, from a country of your choice.

  15. To test with the number provided

    1. Click the red button “Choose this Number”:

       

    2. Your new number will be confirmed, click Done:

       

    3. Your new trial number will now be displayed on your Twilio dashboard:

       

    4. enter the number into your myClubhouse settings page including the country code (+1 for US):

      Important Note:
      If your Twilio phone number is from a different country (has a different country code) to any of the mobile phone numbers stored for your users, the SMS text service will only work if you also store the country code with your users' mobile phone numbers in myClubhouse.

      For example, to send text from a US mobile phone number (starting +1) to a UK mobile phone number (starting +44), the user’s UK phone number must be stored in the format “+447 …” instead of “07 …”. Spaces, hyphens and brackets/braces are allowed.

  16. To test with a number of your choice:

    1. If you want to get a different number click “Search for a different number”:

       

    2. You will be taken to the Buy a Number page. Note: if you have a Trial Account, you do not actually have to pay for the number. It is just showing you what you would pay if you upgraded to a full account.

    3. Select the country you want the number to come from and any capabilites you would like it to have (make sure you select SMS). You can also enter any digits you would like to appear in your number. Click Search:

       

    4. Browse the results and pick a number that you like. Click “Buy”:

       

    5. Review the phone number of your choice and click “Buy …” (you will not be charged in trial account mode):

       

    6. The number will now appear under Manage Numbers > Active Numbers in your Twilio account.

    7. Switch back to myClubhouse and enter the number into your myClubhouse settings page including the country code (+44 for UK):

      Important Note:
      If your Twilio phone number is from a different country (has a different country code) to any of the mobile phone numbers stored for your users, the SMS text service will only work if you also store the country code with your users' mobile phone numbers in myClubhouse.

      For example, to send text from a UK mobile phone number (starting +44) to an Republic of Ireland mobile phone number (starting +353), the user’s RoI phone number must be stored in the format “+353 8 …” instead of “08 …”. Spaces, hyphens and brackets/braces are allowed.

  17. There are two ways to send an SMS text message from myClubhouse:

    1. Click Email > Send SMS

      1. Fill in the message ‘Category’ and ‘To’ (recipients) fields as you would when sending an email.

      2. Enter your message in the Message box (note, there is not formatting avaialable to SMS messages.

      3. Click 'Send”.

    2. Click Email > Send an Email

      1. Here you can send an email in the usual way but also have the option to send an SMS text message as well.

      2. Fill in all the usual fields for email sending then check the box next to SMS.

      3. Enter your SMS message in the box provided.

      4. Click ‘Send’ - both an email and SMS will be sent to all recipients (subject to their having an email address and/or mobile phone number registered).