{"id":15524366,"url":"https://github.com/codeforequity-at/botium-connector-twilio-sms","last_synced_at":"2025-03-28T20:48:22.352Z","repository":{"id":91176475,"uuid":"331894151","full_name":"codeforequity-at/botium-connector-twilio-sms","owner":"codeforequity-at","description":"Botium Connector for Twilio SMS","archived":false,"fork":false,"pushed_at":"2021-12-17T12:09:19.000Z","size":37,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-06T07:17:19.176Z","etag":null,"topics":["botium-box","botium-connector","twilio-cli","twilio-sms"],"latest_commit_sha":null,"homepage":"https://www.botium.ai","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/codeforequity-at.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-01-22T09:13:02.000Z","updated_at":"2021-12-17T12:08:59.000Z","dependencies_parsed_at":"2023-07-16T05:31:35.210Z","dependency_job_id":null,"html_url":"https://github.com/codeforequity-at/botium-connector-twilio-sms","commit_stats":{"total_commits":15,"total_committers":2,"mean_commits":7.5,"dds":0.4666666666666667,"last_synced_commit":"bb4db2ca420724ac377286a6c50980efb1473e7f"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeforequity-at%2Fbotium-connector-twilio-sms","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeforequity-at%2Fbotium-connector-twilio-sms/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeforequity-at%2Fbotium-connector-twilio-sms/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeforequity-at%2Fbotium-connector-twilio-sms/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codeforequity-at","download_url":"https://codeload.github.com/codeforequity-at/botium-connector-twilio-sms/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246100489,"owners_count":20723469,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["botium-box","botium-connector","twilio-cli","twilio-sms"],"created_at":"2024-10-02T10:51:05.506Z","updated_at":"2025-03-28T20:48:22.311Z","avatar_url":"https://github.com/codeforequity-at.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Botium Connector for Twilio SMS\n\n[![NPM](https://nodei.co/npm/botium-connector-twilio-sms.png?downloads=true\u0026downloadRank=true\u0026stars=true)](https://nodei.co/npm/botium-connector-twilio-sms/)\n\n[![Codeship Status for codeforequity-at/botium-connector-twilio-sms](https://app.codeship.com/projects/4500048a-b36f-4108-98ee-6fbf668e4286/status?branch=main)](https://app.codeship.com/projects/428350)\n[![npm version](https://badge.fury.io/js/botium-connector-twilio-sms.svg)](https://badge.fury.io/js/botium-connector-twilio-sms)\n[![license](https://img.shields.io/github/license/mashape/apistatus.svg)]()\n\nThis is a [Botium](https://github.com/codeforequity-at/botium-core) connector for testing SMS\nbots.\n\n__Did you read the [Botium in a Nutshell](https://medium.com/@floriantreml/botium-in-a-nutshell-part-1-overview-f8d0ceaf8fb4) articles? Be warned, without prior knowledge of Botium you won't be able to properly use this library!__\n\n## How it works\nConnector using [Programmable SMS](https://www.twilio.com/docs/sms) of [Twilio](https://www.twilio.com/) \nto send and receive SMS messages in order to test any SMS bot.\n\nThe Connector can be used as any other Botium connector with all Botium Stack components:\n* [Botium CLI](https://github.com/codeforequity-at/botium-cli/)\n* [Botium Bindings](https://github.com/codeforequity-at/botium-bindings/)\n* [Botium Box](https://www.botium.at)\n\nTo receive messages from Twilio API a public endpoint is required. \n* This endpoint has to be configured depending on usage:\n  * If used from [Botium Box](https://www.botium.at), its provided automatical. Redis is required for communication between Connector and Box.\n  * Connector can be started with integrated endpoint (see TWILIO_SMS_INBOUNDPORT and TWILIO_SMS_INBOUNDENDPOINT capabilities)\n  * Endpoint is provided by the Botium Twilio Webhook Proxy included in this module. Redis is required for communication between Connector and Box.\n* This endpoint has to be public:\n  * If used from [Botium Box](https://www.botium.at), then no addititional steps are required.\n  * If the server is not public, then the easiest way to use Twilio cli (which uses ngrok internally) to make it public.\n    * in case of integrated endpoint: ```twilio phone-numbers:update \"\u003c\u003cTWILIO_SMS_FROM\u003e\u003e\" --sms-url=\"http://localhost:\u003c\u003cTWILIO_SMS_INBOUNDPORT\u003e\u003e\u003c\u003cTWILIO_SMS_INBOUNDENDPOINT\u003e\u003e/sms\"``` \n    * If you use Botium Twilio Webhook Proxy, then it displays the complete command for Twilio cli\n  * Or use ngrok: ```ngrok http \u003c\u003cTWILIO_SMS_INBOUNDPORT\u003e\u003e```     \n* This endpoint has to be registered in Twilio:\n  * If you use Twilio cli to make endpoint public, then it registers the endpoint.\n  * You can use Twilio cli just for registering ```twilio phone-numbers:update [PN sid or E.164] --sms-url http://url``` ([see more](https://www.twilio.com/docs/twilio-cli/general-usage#webhooks)) \n  * [Or you can use Twilio console to do it](https://www.twilio.com/docs/sms/tutorials/how-to-receive-and-reply-node-js#configure-your-webhook-url)\n  \nTwilio API is not free, see pricing [here](https://www.twilio.com/voice/pricing).\n\n## Prerequisites\n\n* __Node.js and NPM__\n* (optional) a __Redis__ instance (Cloud hosted free tier for example from [redislabs](https://redislabs.com/) will do as a starter)\n* __Twilio Account__ (See trial account limitation of Twilio [here](https://www.twilio.com/docs/usage/tutorials/how-to-use-your-free-trial-account#trial-account-restrictions-and-limitations)) \n    * [Note accountSid and authToken](https://www.twilio.com/docs/voice/quickstart/node#replace-the-placeholder-credential-values) \n* __[Purchased](https://www.twilio.com/docs/voice/quickstart/node#sign-up-for-twilio-and-get-a-phone-number), or [verified](https://www.twilio.com/docs/usage/tutorials/how-to-use-your-free-trial-account#verify-your-personal-phone-number) Twilio phone number with SMS capabilities enabled__ \n* A __project directory__ on your workstation to hold test cases and Botium configuration    \n\n## Install Botium and Twilio SMS Connector\n\nWhen using __Botium CLI__:\n\n```\n\u003e npm install -g botium-cli\n\u003e npm install -g botium-connector-twilio-sms\n\u003e botium-cli init\n\u003e botium-cli run\n```\n\nWhen using __Botium Bindings__:\n\n```\n\u003e npm install -g botium-bindings\n\u003e npm install -g botium-connector-twilio-sms\n\u003e botium-bindings init mocha\n\u003e npm install \u0026\u0026 npm run mocha\n```\n\nWhen using __Botium Box__:\n\n_Already integrated into Botium Box, no setup required_\n\n## Install and Run the Botium Twilio Webhook Proxy\n\nProxy has two goals:\n* Provides endpoint for Twilio to receive incoming messages\n* Sends messages to Connector using Redis.\n\nInstallation with NPM:\n\n    \u003e npm install -g botium-connector-twilio-sms\n    \u003e botium-twilio-sms-proxy-cli start --help\n\nThere are several options required for running the Botium webhook service:\n\n_--port_: Local port to listen (optional, default _5002_)\n\n_--redisurl_: Redis connection url (optional, default _redis://localhost:6379_) \n\n## Connecting Twilio to Botium\n\nOpen the file _botium.json_ in your working directory fill it. See Supported Capabilities. \n\nConnect the Connector to the Proxy using Redis:\n```\n{\n  \"botium\": {\n    \"Capabilities\": {\n      \"PROJECTNAME\": \"\u003cwhatever\u003e\",\n      \"CONTAINERMODE\": \"twilio-sms\",\n      \"TWILIO_SMS_ACCOUNT_SID\": \"...\",\n      \"TWILIO_SMS_AUTH_TOKEN\": \"...\",\n      \"TWILIO_SMS_FROM\": \"...\",\n      \"TWILIO_SMS_TO\": \"...\",\n      \"TWILIO_SMS_REDISURL\" : \"...\"\n    }\n  }\n}\n```\nOr start a standalone connector with own endpoint:\n```\n{\n  \"botium\": {\n    \"Capabilities\": {\n      \"PROJECTNAME\": \"\u003cwhatever\u003e\",\n      \"CONTAINERMODE\": \"twilio-sms\",\n      \"TWILIO_SMS_ACCOUNT_SID\": \"...\",\n      \"TWILIO_SMS_AUTH_TOKEN\": \"...\",\n      \"TWILIO_SMS_FROM\": \"...\",\n      \"TWILIO_SMS_TO\": \"...\",\n      \"TWILIO_SMS_INBOUNDPORT\": \"...\"\n    }\n  }\n}\n```\n\nBotium setup is ready, you can begin to write your [BotiumScript](https://github.com/codeforequity-at/botium-core/wiki/Botium-Scripting) files.\n\n## Supported Capabilities\n\nSet the capability __CONTAINERMODE__ to __twilio-sms__ to activate this connector.\n\n### TWILIO_SMS_ACCOUNT_SID\n\nSee accountSid in Prerequisites\n\n### TWILIO_SMS_AUTH_TOKEN\n\nSee authToken in Prerequisites\n\n### TWILIO_SMS_FROM\n\n[Purchased](https://www.twilio.com/docs/voice/quickstart/node#sign-up-for-twilio-and-get-a-phone-number), or [verified](https://www.twilio.com/docs/usage/tutorials/how-to-use-your-free-trial-account#verify-your-personal-phone-number) phone number  \n\n### TWILIO_SMS_TO\n\nTelephone number.\n\n### TWILIO_SMS_INBOUNDPORT and TWILIO_SMS_INBOUNDENDPOINT\n_only required when **NOT** using the Botium Twilio Webhook Proxy_\n\nLocal port and endpoint to be used for launching the webhook\n\nThe default of `TWILIO_SMS_INBOUNDENDPOINT` is `\"\\\"`\n\n### TWILIO_SMS_REDISURL and TWILIO_SMS_REDIS_TOPICBASE\n_only required when using the Botium Twilio Webhook Proxy_\n\nRedis Url and base topic name for Redis subscription topic.\n\nThe default url for local redis is _redis://localhost:6379_\n\n`TWILIO_SMS_INBOUNDENDPOINT` is optional.\n\n## Changelog\n\n### 0.1.0\n - Twilio cli is removed from dependencies. (It is a heavy but optional package)\n - All version numbers updated.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodeforequity-at%2Fbotium-connector-twilio-sms","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodeforequity-at%2Fbotium-connector-twilio-sms","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodeforequity-at%2Fbotium-connector-twilio-sms/lists"}