{"id":641,"date":"2017-10-30T16:16:57","date_gmt":"2017-10-30T16:16:57","guid":{"rendered":"http:\/\/kb.powercode.com\/?post_type=ht_kb&#038;p=641"},"modified":"2018-09-05T18:55:50","modified_gmt":"2018-09-05T18:55:50","slug":"twilio","status":"publish","type":"ht_kb","link":"https:\/\/kb.powercode.com\/?ht_kb=twilio","title":{"rendered":"Twilio"},"content":{"rendered":"    \t\t<div class=\"hts-messages hts-messages--info   hts-messages--withicon \"   >\r\n    \t\t\t    \t\t\t    \t\t\t\t<p>\r\n    \t\t\t\t\tThis feature is first available in 17.10.24 and greatly improved in following versions. Documentation may represent a newer version.    \t\t\t\t<\/p>\r\n    \t\t\t    \t\t\t\r\n    \t\t<\/div><!-- \/.ht-shortcodes-messages -->\r\n    \t\t\n<h3>Video Tutorial<\/h3>\n<p><iframe loading=\"lazy\" width=\"643\" height=\"362\" src=\"https:\/\/www.youtube.com\/embed\/4UjRMb9Wvi4?feature=oembed\" frameborder=\"0\" allow=\"autoplay; encrypted-media\" allowfullscreen><\/iframe><\/p>\n<h3>Setting Up<\/h3>\n<p>Twilio is an application platform for creating and sending programmable SMS and Voice messages. In Powercode, we have integrated with the programmable SMS side to allow our WISPs to send SMS to their customers. All Twilio SMS pricing\/plans\u00a0<a href=\"https:\/\/www.twilio.com\/sms\/pricing\">can be found here<\/a>. To set up your Twilio integration, you will need a\u00a0<a href=\"https:\/\/www.twilio.com\/try-twilio\">Twilio account which can be obtained here<\/a>. After sign up, you will be directed to the Twilio Console.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone wp-image-743 size-large\" src=\"http:\/\/kb.powercode.com\/wp-content\/uploads\/2017\/10\/Twilio_Console_4-1024x576-1-1024x576.png\" alt=\"\" width=\"643\" height=\"362\" srcset=\"https:\/\/kb.powercode.com\/wp-content\/uploads\/2017\/10\/Twilio_Console_4-1024x576-1.png 1024w, https:\/\/kb.powercode.com\/wp-content\/uploads\/2017\/10\/Twilio_Console_4-1024x576-1-300x169.png 300w, https:\/\/kb.powercode.com\/wp-content\/uploads\/2017\/10\/Twilio_Console_4-1024x576-1-768x432.png 768w, https:\/\/kb.powercode.com\/wp-content\/uploads\/2017\/10\/Twilio_Console_4-1024x576-1-50x28.png 50w, https:\/\/kb.powercode.com\/wp-content\/uploads\/2017\/10\/Twilio_Console_4-1024x576-1-60x34.png 60w, https:\/\/kb.powercode.com\/wp-content\/uploads\/2017\/10\/Twilio_Console_4-1024x576-1-100x56.png 100w\" sizes=\"(max-width: 643px) 100vw, 643px\" \/><br \/>\nFrom here, you will need to set up a programmable SMS on twilio. You do that by clicking on the Programmable SMS button on the console. You will need to obtain a Twilio phone number in order to use this integration. Do this by either clicking on &#8220;Get Started&#8221; or the &#8220;Learn &amp; Build&#8221; tab on the left side of the console.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone wp-image-744 size-full\" src=\"http:\/\/kb.powercode.com\/wp-content\/uploads\/2017\/10\/Learn-Build-1.png\" alt=\"\" width=\"994\" height=\"441\" srcset=\"https:\/\/kb.powercode.com\/wp-content\/uploads\/2017\/10\/Learn-Build-1.png 994w, https:\/\/kb.powercode.com\/wp-content\/uploads\/2017\/10\/Learn-Build-1-300x133.png 300w, https:\/\/kb.powercode.com\/wp-content\/uploads\/2017\/10\/Learn-Build-1-768x341.png 768w, https:\/\/kb.powercode.com\/wp-content\/uploads\/2017\/10\/Learn-Build-1-50x22.png 50w, https:\/\/kb.powercode.com\/wp-content\/uploads\/2017\/10\/Learn-Build-1-60x27.png 60w, https:\/\/kb.powercode.com\/wp-content\/uploads\/2017\/10\/Learn-Build-1-100x44.png 100w\" sizes=\"(max-width: 994px) 100vw, 994px\" \/><\/p>\n<p>From here you can obtain a phone number. By default, Twilio will pick a number for you. If you would like a number with a different area code, simply click on &#8220;Search for a different number&#8221; to input the area code of your liking.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-745\" src=\"http:\/\/kb.powercode.com\/wp-content\/uploads\/2017\/10\/Twilio-Get-Number2-1.png\" alt=\"\" width=\"816\" height=\"341\" srcset=\"https:\/\/kb.powercode.com\/wp-content\/uploads\/2017\/10\/Twilio-Get-Number2-1.png 816w, https:\/\/kb.powercode.com\/wp-content\/uploads\/2017\/10\/Twilio-Get-Number2-1-300x125.png 300w, https:\/\/kb.powercode.com\/wp-content\/uploads\/2017\/10\/Twilio-Get-Number2-1-768x321.png 768w, https:\/\/kb.powercode.com\/wp-content\/uploads\/2017\/10\/Twilio-Get-Number2-1-50x21.png 50w, https:\/\/kb.powercode.com\/wp-content\/uploads\/2017\/10\/Twilio-Get-Number2-1-60x25.png 60w, https:\/\/kb.powercode.com\/wp-content\/uploads\/2017\/10\/Twilio-Get-Number2-1-100x42.png 100w\" sizes=\"(max-width: 816px) 100vw, 816px\" \/><\/p>\n<p>Once you&#8217;ve chosen a number, return to the Console Dashboard by either clicking on the home icon on the top left or on &#8220;Console.&#8221;<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-746\" src=\"http:\/\/kb.powercode.com\/wp-content\/uploads\/2017\/10\/Twilio-Console-Dashboard-1.png\" alt=\"\" width=\"524\" height=\"237\" srcset=\"https:\/\/kb.powercode.com\/wp-content\/uploads\/2017\/10\/Twilio-Console-Dashboard-1.png 524w, https:\/\/kb.powercode.com\/wp-content\/uploads\/2017\/10\/Twilio-Console-Dashboard-1-300x136.png 300w, https:\/\/kb.powercode.com\/wp-content\/uploads\/2017\/10\/Twilio-Console-Dashboard-1-50x23.png 50w, https:\/\/kb.powercode.com\/wp-content\/uploads\/2017\/10\/Twilio-Console-Dashboard-1-60x27.png 60w, https:\/\/kb.powercode.com\/wp-content\/uploads\/2017\/10\/Twilio-Console-Dashboard-1-100x45.png 100w\" sizes=\"(max-width: 524px) 100vw, 524px\" \/><\/p>\n<p>From here, copy your Account SID and Auth Token (make it visible to copy it) and paste them into the Config-&gt;Third Party Integrations-&gt;Twilio page in Powercode along with your newly acquired phone number (with +1 in the front of the number) from Twilio. The From Phone Number MUST be in this format &#8220;+15551234567&#8221; for it to work correctly.<img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-747\" src=\"http:\/\/kb.powercode.com\/wp-content\/uploads\/2017\/10\/Powercode-Twilio-Config-1.png\" alt=\"\" width=\"625\" height=\"389\" srcset=\"https:\/\/kb.powercode.com\/wp-content\/uploads\/2017\/10\/Powercode-Twilio-Config-1.png 625w, https:\/\/kb.powercode.com\/wp-content\/uploads\/2017\/10\/Powercode-Twilio-Config-1-300x187.png 300w, https:\/\/kb.powercode.com\/wp-content\/uploads\/2017\/10\/Powercode-Twilio-Config-1-50x31.png 50w, https:\/\/kb.powercode.com\/wp-content\/uploads\/2017\/10\/Powercode-Twilio-Config-1-60x37.png 60w, https:\/\/kb.powercode.com\/wp-content\/uploads\/2017\/10\/Powercode-Twilio-Config-1-100x62.png 100w\" sizes=\"(max-width: 625px) 100vw, 625px\" \/><\/p>\n<h3>Setting Up Opt-In\/Opt-Out Authorization<\/h3>\n<p>On the Twilio&#8217;s Dashboard in Manage Numbers-&gt;Your Number under the Messaging Tab, you can add your server URL for POST of Twilio&#8217;s WebHook (<em><strong>YourServer:444\/api\/twilio<\/strong><\/em><strong>\/<\/strong>).<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-858\" src=\"http:\/\/kb.powercode.com\/wp-content\/uploads\/2017\/11\/Twilio-Web-Hook-Example.png\" alt=\"\" width=\"868\" height=\"336\" srcset=\"https:\/\/kb.powercode.com\/wp-content\/uploads\/2017\/11\/Twilio-Web-Hook-Example.png 868w, https:\/\/kb.powercode.com\/wp-content\/uploads\/2017\/11\/Twilio-Web-Hook-Example-300x116.png 300w, https:\/\/kb.powercode.com\/wp-content\/uploads\/2017\/11\/Twilio-Web-Hook-Example-768x297.png 768w, https:\/\/kb.powercode.com\/wp-content\/uploads\/2017\/11\/Twilio-Web-Hook-Example-50x19.png 50w, https:\/\/kb.powercode.com\/wp-content\/uploads\/2017\/11\/Twilio-Web-Hook-Example-60x23.png 60w, https:\/\/kb.powercode.com\/wp-content\/uploads\/2017\/11\/Twilio-Web-Hook-Example-100x39.png 100w\" sizes=\"(max-width: 868px) 100vw, 868px\" \/><\/p>\n<p>The resulting Messaging Post configuration on the numbers page (found under the\u00a0 <strong>All Products and Services &gt; Phone Numbers<\/strong>) should look like the below:<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-1138\" src=\"http:\/\/kb.powercode.com\/wp-content\/uploads\/2017\/10\/ImagineTwilioImage.jpg\" alt=\"\" width=\"1584\" height=\"319\" srcset=\"https:\/\/kb.powercode.com\/wp-content\/uploads\/2017\/10\/ImagineTwilioImage.jpg 1584w, https:\/\/kb.powercode.com\/wp-content\/uploads\/2017\/10\/ImagineTwilioImage-300x60.jpg 300w, https:\/\/kb.powercode.com\/wp-content\/uploads\/2017\/10\/ImagineTwilioImage-768x155.jpg 768w, https:\/\/kb.powercode.com\/wp-content\/uploads\/2017\/10\/ImagineTwilioImage-1024x206.jpg 1024w, https:\/\/kb.powercode.com\/wp-content\/uploads\/2017\/10\/ImagineTwilioImage-50x10.jpg 50w, https:\/\/kb.powercode.com\/wp-content\/uploads\/2017\/10\/ImagineTwilioImage-60x12.jpg 60w, https:\/\/kb.powercode.com\/wp-content\/uploads\/2017\/10\/ImagineTwilioImage-100x20.jpg 100w\" sizes=\"(max-width: 1584px) 100vw, 1584px\" \/><\/p>\n    \t\t<div class=\"hts-messages hts-messages--info   hts-messages--withicon \"   >\r\n    \t\t\t    \t\t\t    \t\t\t\t<p>\r\n    \t\t\t\t\tYou will note that the above example also handles voice contacts using Twimlets. Documentation on Twimlets can be found at https:\/\/www.twilio.com\/labs\/twimlets    \t\t\t\t<\/p>\r\n    \t\t\t    \t\t\t\r\n    \t\t<\/div><!-- \/.ht-shortcodes-messages -->\r\n    \t\t\n<h3>Handling Twilio Responses<\/h3>\n<p>SMS responses from customers show up under the <strong>SMS<\/strong> page that can be reached by clicking on the green <strong>SMS <\/strong>button on the account overview.<\/p>\n<p>If you would like to proactively monitor incoming responses there are currently two main options.<\/p>\n<ol>\n<li>You can set up a <strong>Webhook<\/strong> that sends the incoming <strong>SMS<\/strong> to a URL of your choice or a\u00a0<strong>Slack<\/strong> channel as explained in the <a href=\"http:\/\/kb.powercode.com\/?ht_kb=webhooks-api\">Webhooks example.<\/a><\/li>\n<li>You can regularly check the following custom report, after adding it to your system on the reports page with a name and description of your choosing.\n<pre>select * from TwilioLog \r\nwhere User not in (Select Username from WebUser)<\/pre>\n<\/li>\n<\/ol>\n<h3>Integrated Twilio Features<\/h3>\n<p>Now that you have your system set up to use Twilio, here are Powercode&#8217;s integrated features:<\/p>\n<p><a href=\"http:\/\/kb.powercode.com\/?ht_kb=twilio-customer-opt-in-opt-out\">Customer Opt-In\/Opt-Out<\/a><\/p>\n<p><a href=\"http:\/\/kb.powercode.com\/?ht_kb=twilio-pre-delinquent-sms\">Pre-Delinquent SMS<\/a><\/p>\n<p><a href=\"http:\/\/kb.powercode.com\/?ht_kb=twilio-features\">Custom SMS<\/a><\/p>\n<p><a href=\"http:\/\/kb.powercode.com\/?ht_kb=twilio-send-mass-sms\">Mass SMS<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Video Tutorial Setting Up Twilio is an application platform for creating and sending programmable SMS and Voice messages. In Powercode, we have integrated with the programmable SMS side to allow our WISPs to send SMS to their customers. All Twilio SMS pricing\/plans\u00a0can be found here. To set up your Twilio&#8230;<\/p>\n","protected":false},"author":9,"comment_status":"open","ping_status":"closed","template":"","format":"standard","meta":[],"ht-kb-category":[53,27],"ht-kb-tag":[],"_links":{"self":[{"href":"https:\/\/kb.powercode.com\/index.php?rest_route=\/wp\/v2\/ht-kb\/641"}],"collection":[{"href":"https:\/\/kb.powercode.com\/index.php?rest_route=\/wp\/v2\/ht-kb"}],"about":[{"href":"https:\/\/kb.powercode.com\/index.php?rest_route=\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/kb.powercode.com\/index.php?rest_route=\/wp\/v2\/users\/9"}],"replies":[{"embeddable":true,"href":"https:\/\/kb.powercode.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=641"}],"version-history":[{"count":22,"href":"https:\/\/kb.powercode.com\/index.php?rest_route=\/wp\/v2\/ht-kb\/641\/revisions"}],"predecessor-version":[{"id":1139,"href":"https:\/\/kb.powercode.com\/index.php?rest_route=\/wp\/v2\/ht-kb\/641\/revisions\/1139"}],"wp:attachment":[{"href":"https:\/\/kb.powercode.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=641"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/kb.powercode.com\/index.php?rest_route=%2Fwp%2Fv2%2Fht-kb-category&post=641"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/kb.powercode.com\/index.php?rest_route=%2Fwp%2Fv2%2Fht-kb-tag&post=641"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}