Giter VIP home page Giter VIP logo

twilio-cli's Introduction

A CLI for Twilio

Travis Build Status codecov Learn with TwilioQuest

Requirements

Currently, Node 18+ is supported. We support the LTS versions of Node.

Setup

Head over to the Twilio CLI documentation.

Architecture and Functional Overview

Head over to the CLI Architecture and Functional Overview

Versioning

twilio-cli uses a modified version of Semantic Versioning for all changes. See this document for details.

Usage

See the General usage guide.

Examples

Review the Examples.

Plugins

You can review the docs on available plugins and how to install them. If you are interested in writing your own plugin, refer to the plugin authoring docs.

Contributing

  1. Clone this repo.
  2. From the repo directory, run: npm install
  3. Run ./bin/run from the repo directory to run the CLI.

Feedback

Please file a GitHub issue in this repository for any issues/bugs.

We’d love to hear from you. Any time you have feedback you’d like to send us, fill the CLI Feedback form or just run: the twilio feedback command.

License

MIT

twilio-cli's People

Contributors

aroach avatar asabuhere avatar ayyrickay avatar charan678 avatar childish-sambino avatar dependabot[bot] avatar dprothero avatar eshanholtz avatar isha689 avatar jennifermah avatar kolencherry avatar kridai avatar maylonpedroso avatar micaswyers-work avatar onlywade avatar onuzbee avatar philnash avatar ravali-rimmalapudi avatar sbansla avatar semantic-release-bot avatar sergiofbsilva avatar shrutiburman avatar shwetha-manvinkurke avatar sindhura3 avatar sr010 avatar stern-shawn avatar thinkingserious avatar tiwarishubham635 avatar twilio-ci avatar twilio-dx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

twilio-cli's Issues

Incorrect handling of prefixed_collapsible_map parameters

Issue Summary

Incorrect handling of PREFIXED_COLLAPSIBLE_MAP. The CLI is not decomposing the parameter value in the expected parameters to send in the request.

Steps to Reproduce

Running:

twilio api:lookups:v1:phone-numbers:fetch \
    --phone-number +16502530000 \
    --add-ons payfone_tcpa_compliance \
    --add-ons-data "{\"payfone_tcpa_compliance.RightPartyContactedDate\": \"20160101\"}"

Should make a GET request to:

https://lookups.twilio.com/v1/PhoneNumbers/+16502530000?AddOns=payfone_tcpa_compliance&AddOns.payfone_tcpa_compliance.RightPartyContactedDate=20160101

but is doing:

https://lookups.twilio.com/v1/PhoneNumbers/+16502530000?AddOns=payfone_tcpa_compliance&AddOnsData={%22payfone_tcpa_compliance.RightPartyContactedDate%22:%2220160101%22}

Technical details:

  • twilio-cli Version: 1.4.1 linux-x64
  • Node.js Version: v8.13.0

twilio profiles:list shows inaccurate Active status

Issue Summary

~/.twilio-cli/config.json has property activeProject: null despitetwilio profiles:list command showing Active true. This occurs after running twilio profiles:remove 'active project' command when two projects added and leaving a single project configured.

Command to view video apps (twilio rtc:apps:video:view) fails.

Steps to Reproduce

  1. Add profile for Project A with twilio profiles:create command
  2. Add profile for Project B with twilio profiles:create command
  3. Set Project A as active with twilio profiles:use 'Project A' command
  4. Remove Project A with twilio profiles:remove 'Project A' command
  5. Run command twilio profiles:list and see Project B shows active
  6. Run command cat ~/.twilio-cli/config.json and see activeProject property shows null

Technical details:

  • Mac OS Mojave (10.14.6)
  • twilio-cli version 4.6.0
  • node.js version v10.16.3
  • Command output with debug logging enabled (adding -l debug to the end of the command):
[DEBUG] Config File: /Users/User/config.json
[DEBUG] Using profile: Consumer Assessment - Dev
[DEBUG] -- BEGIN Twilio API Request --
[DEBUG] GET https://serverless.twilio.com/v1/Services
[DEBUG] User-Agent: @twilio/cli-core/4.6.0 (twilio-node/3.42.2, node.js v10.16.3, darwin 18.7.0 x64, rtc:apps:video:view)
[DEBUG] -- END Twilio API Request --
[DEBUG] response.statusCode: 200
[DEBUG] response.headers: {"date":"Thu, 23 Apr 2020 22:33:19 GMT","content-type":"application/json; charset=utf-8; charset=utf-8","content-length":"1067","connection":"close","twilio-concurrent-requests":"1","twilio-request-id":"RQ9d236c390be94cf0aa21ac8710be6610","twilio-request-duration":"0.019","access-control-allow-origin":"*","access-control-allow-headers":"Accept, Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since","access-control-allow-methods":"GET, POST, DELETE, OPTIONS","access-control-expose-headers":"ETag","access-control-allow-credentials":"true","x-powered-by":"AT-5000","x-shenanigans":"none","x-home-region":"us1","x-api-domain":"serverless.twilio.com","strict-transport-security":"max-age=31536000"}
[DEBUG] -- BEGIN Twilio API Request --
[DEBUG] GET https://serverless.twilio.com/v1/Services/ZSb393adc5c07f92c6f4c2a29bab822e5a/Environments
[DEBUG] User-Agent: @twilio/cli-core/4.6.0 (twilio-node/3.42.2, node.js v10.16.3, darwin 18.7.0 x64, rtc:apps:video:view)
[DEBUG] -- END Twilio API Request --
[DEBUG] response.statusCode: 200
[DEBUG] response.headers: {"date":"Thu, 23 Apr 2020 22:33:19 GMT","content-type":"application/json; charset=utf-8; charset=utf-8","content-length":"380","connection":"close","twilio-concurrent-requests":"1","twilio-request-id":"RQ0427e646739b442f9d6fb2730cd834d8","twilio-request-duration":"0.021","access-control-allow-origin":"*","access-control-allow-headers":"Accept, Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since","access-control-allow-methods":"GET, POST, DELETE, OPTIONS","access-control-expose-headers":"ETag","access-control-allow-credentials":"true","x-powered-by":"AT-5000","x-shenanigans":"none","x-home-region":"us1","x-api-domain":"serverless.twilio.com","strict-transport-security":"max-age=31536000"}
 » twilio-cli encountered an unexpected error. To report this issue, execute the command with the "-l debug" flag, then copy the output to a new issue here: https://github.com/twilio/twilio-cli/issues
[DEBUG] Cannot read property 'sid' of undefined
[DEBUG] TypeError: Cannot read property 'sid' of undefined
    at ViewCommand.getAppInfo (/Users/User/.twilio-cli/node_modules/@twilio-labs/plugin-rtc/src/helpers.js:76:64)
    at process._tickCallback (internal/process/next_tick.js:68:7)

Phone numbers create asks for area_code, but needs area-code instead

Issue Summary

When trying to buy a phone number from the CLI, if you don't specify anything it gives a 400 error

Error code 400 from Twilio: did or area_code is required. See https://www.twilio.com/docs/errors/400 for more info.

But what the valid parameter is area-code (dash vs underscore)

Steps to Reproduce

https://www.evernote.com/l/ACVChLtk06RFbbKoWBuOzk7Udx84GuyQXsoB/image.png

  1. twilio api:core:incoming-phone-numbers:create get the error
  2. add the requested area_code parameter twilio api:core:incoming-phone-numbers:create --area_code 415 and get an error

Technical details:

  • twilio-cli Version: twilio-cli/1.4.1 darwin-x64 node-v10.16.0

When trying to login get error 'uv_os_get_passwd returned ENOENT '

Issue Summary

When I try to login using Twilio login feature it fails to login giving following error

[DEBUG] A system error occurred: uv_os_get_passwd returned ENOENT (no such file or directory)
[DEBUG] SystemError [ERR_SYSTEM_ERROR]: A system error occurred: uv_os_get_passwd returned ENOENT (no such file or directory)
    at Object.userInfo (os.js:265:11)
    at Login.getApiKeyFriendlyName (/usr/local/Cellar/twilio/1.9.6/libexec/src/commands/profiles/create.js:176:47)
    at Login.saveCredentials (/usr/local/Cellar/twilio/1.9.6/libexec/src/commands/profiles/create.js:181:37)
    at Login.run (/usr/local/Cellar/twilio/1.9.6/libexec/src/commands/profiles/create.js:46:18)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async Login._run (/usr/local/Cellar/twilio/1.9.6/libexec/node_modules/@oclif/command/lib/command.js:44:20)
    at async Config.runCommand (/usr/local/Cellar/twilio/1.9.6/libexec/node_modules/@oclif/config/lib/config.js:160:9)
    at async Main.run (/usr/local/Cellar/twilio/1.9.6/libexec/node_modules/@oclif/command/lib/main.js:21:9)
    at async Main._run (/usr/local/Cellar/twilio/1.9.6/libexec/node_modules/@oclif/command/lib/command.js:44:20)

Steps to Reproduce

  1. This is the first step
  2. This is the second step
  3. Further steps, etc.

Code Snippet

twilio login -l debug

Exception/Log

[DEBUG] A system error occurred: uv_os_get_passwd returned ENOENT (no such file or directory)
[DEBUG] SystemError [ERR_SYSTEM_ERROR]: A system error occurred: uv_os_get_passwd returned ENOENT (no such file or directory)
    at Object.userInfo (os.js:265:11)
    at Login.getApiKeyFriendlyName (/usr/local/Cellar/twilio/1.9.6/libexec/src/commands/profiles/create.js:176:47)
    at Login.saveCredentials (/usr/local/Cellar/twilio/1.9.6/libexec/src/commands/profiles/create.js:181:37)
    at Login.run (/usr/local/Cellar/twilio/1.9.6/libexec/src/commands/profiles/create.js:46:18)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async Login._run (/usr/local/Cellar/twilio/1.9.6/libexec/node_modules/@oclif/command/lib/command.js:44:20)
    at async Config.runCommand (/usr/local/Cellar/twilio/1.9.6/libexec/node_modules/@oclif/config/lib/config.js:160:9)
    at async Main.run (/usr/local/Cellar/twilio/1.9.6/libexec/node_modules/@oclif/command/lib/main.js:21:9)
    at async Main._run (/usr/local/Cellar/twilio/1.9.6/libexec/node_modules/@oclif/command/lib/command.js:44:20)

Technical details:

  • twilio-cli version: twilio-cli/1.9.6 darwin-x64 node-v13.8.0
  • node version: v13.8.0
  • Command output with debug logging enabled (adding -l debug to the end of the command):
    twilio login -l debug

paste output here

? Shorthand identifier for your profile: xxxxxxx
You can find your Account SID and Auth Token at https://www.twilio.com/console
 » Your Auth Token will be used once to create an API Key for future CLI access to your Twilio Project, and then forgotten.
? The Account SID for your Twilio Project: ACxxxxxxxxxx
? Your Twilio Auth Token for your Twilio Project: [hidden]

Error: Cannot autolaunch D-Bus without X11 $DISPLAY

Issue Summary

A summary of the issue and the environment in which it occurs. If suitable, include the steps required to reproduce the bug. Please feel free to include screenshots, screencasts, or code examples.

Steps to Reproduce

  1. This is the first step
  2. This is the second step
  3. Further steps, etc.

Any other information you want to share that is relevant to the issue being reported. Especially, why do you consider this to be a bug? What do you expect to happen instead?

Technical details:

  • twilio version output:
  • Command output with debug logging enabled (adding -l debug to the end of the command):
output

Listing Messaging Services

▶ twilio api:messaging:v1:services:list -l debug

[DEBUG] Config File: /Users/kuryaki/.twilio-cli/config.json
[DEBUG] Using project: ${TWILIO_ACCOUNT_SID}/${TWILIO_AUTH_TOKEN}
[DEBUG] Provided flags: {"cli-log-level":"debug","properties":"sid,friendlyName,dateCreated","cli-output-format":"columns"}
[DEBUG] domainName=messaging, path=/v1/Services, actionName=list
[DEBUG] -- BEGIN Twilio API Request --
[DEBUG] get https://messaging.twilio.com/v1/Services
[DEBUG] User-Agent: @twilio/cli-core/2.0.3 (twilio-api-client/2.0.3, node.js v12.5.0, darwin 18.6.0 x64, api:messaging:v1:services:list)
[DEBUG] -- END Twilio API Request --
[DEBUG] response.statusCode: 200
[DEBUG] response.headers: {"date":"Tue, 16 Jul 2019 20:59:28 GMT","content-type":"application/json; charset=utf-8","content-length":"62491","connection":"close","twilio-concurrent-requests":"1","twilio-request-id":"XXXX","twilio-request-duration":"0.076","access-control-allow-origin":"*","access-control-allow-headers":"Accept, Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since","access-control-allow-methods":"GET, POST, DELETE, OPTIONS","access-control-expose-headers":"ETag","access-control-allow-credentials":"true","x-powered-by":"AT-5000","x-shenanigans":"none","x-home-region":"us1","x-api-domain":"messaging.twilio.com","strict-transport-security":"max-age=31536000"}
[DEBUG] -- BEGIN Twilio API Request --
[DEBUG] get https://messaging.twilio.comhttps://messaging.twilio.com/v1/Services?PageSize=50&Page=1&PageToken=XXXX
[DEBUG] User-Agent: @twilio/cli-core/2.0.3 (twilio-api-client/2.0.3, node.js v12.5.0, darwin 18.6.0 x64, api:messaging:v1:services:list)
[DEBUG] -- END Twilio API Request --
» twilio-cli encountered an unexpected error. To report this issue, execute the command with the "-l debug" flag, then copy the output to a new issue here: https://github.com/twilio/twilio-cli/issues
[DEBUG] getaddrinfo ENOTFOUND messaging.twilio.comhttps
[DEBUG] Error: getaddrinfo ENOTFOUND messaging.twilio.comhttps
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:60:26)

Install error

$ npm install -g twilio-cli
/usr/local/bin/twilio -> /usr/local/lib/node_modules/twilio-cli/bin/run

[email protected] install /usr/local/lib/node_modules/twilio-cli/node_modules/keytar
prebuild-install || node-gyp rebuild

prebuild-install WARN install No prebuilt binaries found (target=10.8.0 runtime=node arch=x64 platform=darwin)
gyp ERR! configure error
gyp ERR! stack Error: Command failed: /Users/katsumi/.pyenv/shims/python2 -c import platform; print(platform.python_version());
gyp ERR! stack pyenv: python2: command not found
gyp ERR! stack
gyp ERR! stack The python2' command exists in these Python versions: gyp ERR! stack 2.7.11 gyp ERR! stack gyp ERR! stack gyp ERR! stack at ChildProcess.exithandler (child_process.js:288:12) gyp ERR! stack at ChildProcess.emit (events.js:182:13) gyp ERR! stack at maybeClose (internal/child_process.js:962:16) gyp ERR! stack at Socket.stream.socket.on (internal/child_process.js:381:11) gyp ERR! stack at Socket.emit (events.js:182:13) gyp ERR! stack at Pipe._handle.close (net.js:599:12) gyp ERR! System Darwin 17.7.0 gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /usr/local/lib/node_modules/twilio-cli/node_modules/keytar gyp ERR! node -v v10.8.0 gyp ERR! node-gyp -v v3.7.0 gyp ERR! not ok npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! [email protected] install: prebuild-install || node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/katsumi/.npm/_logs/2018-10-16T20_04_16_588Z-debug.log

twilio could not get credentials for profile

Steps to reproduce:

  1. twilio profiles:add
  2. provide friendlyname
  3. provide account sid and auth token
  4. twilio profiles:use friendlyname
  5. twilio watch

Could not get credentials for profile "dev-dealerstack".
» To reconfigure the profile, run: twilio profiles:add

Rinse and repeat and get the same issue

twilio-cli/1.9.2 darwin-x64 node-v12.14.0

twilio serverless:deploy unexpected error

Technical details:

  • twilio-cli version: twilio-cli/2.0.0 darwin-x64 node-v13.7.0
  • node version: v13.7.0
  • Command output with debug logging enabled (adding -l debug to the end of the command):
Deploying functions & assets to the Twilio Runtime

Account		AC2e28b44893fdebc06eb44c73fa07c03b
Token		82be****************************
Service Name	stripe-payment-link-sms
Environment	dev
Root Directory	/Users/thorsten/Documents/twilio/function-templates/stripe-payment-link-sms
Dependencies	stripe
Env Variables	STRIPE_SECRET_KEY

⠋ Deploying Function  twilio-serverless-api:client Deploy config {
  twilio-serverless-api:client   cwd: '/Users/thorsten/Documents/twilio/function-templates/stripe-payment-link-sms',
  twilio-serverless-api:client   envPath: '/Users/thorsten/Documents/twilio/function-templates/stripe-payment-link-sms/.env',
  twilio-serverless-api:client   accountSid: 'AC2e28b44893fdebc06eb44c73fa07c03b',
  twilio-serverless-api:client   authToken: '[REDACTED]',
  twilio-serverless-api:client   env: { STRIPE_SECRET_KEY: '[REDACTED]' },
  twilio-serverless-api:client   serviceSid: 'ZS5ad06539c2d5760d7b5f7218bc1f5649',
  twilio-serverless-api:client   pkgJson: { name: '[REDACTED]', dependencies: '[REDACTED]' },
  twilio-serverless-api:client   overrideExistingService: false,
  twilio-serverless-api:client   force: false,
  twilio-serverless-api:client   serviceName: 'stripe-payment-link-sms',
  twilio-serverless-api:client   functionsEnv: 'dev',
  twilio-serverless-api:client   noAssets: false,
  twilio-serverless-api:client   noFunctions: false
  twilio-serverless-api:client } +0ms
  twilio-serverless-api:fs Search for directory. Options: "functions,src" +0ms
  twilio-serverless-api:fs Found Functions Directory "/Users/thorsten/Documents/twilio/function-templates/stripe-payment-link-sms/functions" +0ms
  twilio-serverless-api:fs Search for directory. Options: "assets,static" +0ms
  twilio-serverless-api:fs Found Assets Directory "undefined" +1ms
⠸ Configuring "dev" environment
  twilio-serverless-api:utils:pagination GotError [HTTPError]: Response code 404 (NOT FOUND)
  twilio-serverless-api:utils:pagination     at EventEmitter.<anonymous> (/Users/thorsten/.twilio-cli/node_modules/got/source/as-promise.js:74:19)
  twilio-serverless-api:utils:pagination     at processTicksAndRejections (internal/process/task_queues.js:97:5) {
  twilio-serverless-api:utils:pagination   name: 'HTTPError',
  twilio-serverless-api:utils:pagination   host: undefined,
  twilio-serverless-api:utils:pagination   hostname: 'serverless.twilio.com',
  twilio-serverless-api:utils:pagination   method: 'GET',
  twilio-serverless-api:utils:pagination   path: '/v1/Services/ZS5ad06539c2d5760d7b5f7218bc1f5649/Environments',
  twilio-serverless-api:utils:pagination   socketPath: undefined,
  twilio-serverless-api:utils:pagination   protocol: 'https:',
  twilio-serverless-api:utils:pagination   url: 'https://serverless.twilio.com/v1/Services/ZS5ad06539c2d5760d7b5f7218bc1f5649/Environments',
  twilio-serverless-api:utils:pagination   gotOptions: {
  twilio-serverless-api:utils:pagination     path: '/v1/Services/ZS5ad06539c2d5760d7b5f7218bc1f5649/Environments',
  twilio-serverless-api:utils:pagination     protocol: 'https:',
  twilio-serverless-api:utils:pagination     hostname: 'serverless.twilio.com',
  twilio-serverless-api:utils:pagination     hash: '',
  twilio-serverless-api:utils:pagination     search: '',
  twilio-serverless-api:utils:pagination     pathname: '/v1/Services/ZS5ad06539c2d5760d7b5f7218bc1f5649/Environments',
  twilio-serverless-api:utils:pagination     href: 'https://serverless.twilio.com/v1/Services/ZS5ad06539c2d5760d7b5f7218bc1f5649/Environments',
  twilio-serverless-api:utils:pagination     retry: {
  twilio-serverless-api:utils:pagination       retries: [Function (anonymous)],
  twilio-serverless-api:utils:pagination       methods: [Set],
  twilio-serverless-api:utils:pagination       statusCodes: [Set],
  twilio-serverless-api:utils:pagination       errorCodes: [Set]
  twilio-serverless-api:utils:pagination     },
  twilio-serverless-api:utils:pagination     headers: {
  twilio-serverless-api:utils:pagination       'user-agent': 'twilio-serverless-api',
  twilio-serverless-api:utils:pagination       accept: 'application/json',
  twilio-serverless-api:utils:pagination       'accept-encoding': 'gzip, deflate'
  twilio-serverless-api:utils:pagination     },
  twilio-serverless-api:utils:pagination     hooks: {
  twilio-serverless-api:utils:pagination       beforeError: [],
  twilio-serverless-api:utils:pagination       init: [],
  twilio-serverless-api:utils:pagination       beforeRequest: [],
  twilio-serverless-api:utils:pagination       beforeRedirect: [],
  twilio-serverless-api:utils:pagination       beforeRetry: [],
  twilio-serverless-api:utils:pagination       afterResponse: []
  twilio-serverless-api:utils:pagination     },
  twilio-serverless-api:utils:pagination     decompress: true,
  twilio-serverless-api:utils:pagination     throwHttpErrors: true,
  twilio-serverless-api:utils:pagination     followRedirect: true,
  twilio-serverless-api:utils:pagination     stream: false,
  twilio-serverless-api:utils:pagination     form: false,
  twilio-serverless-api:utils:pagination     json: true,
  twilio-serverless-api:utils:pagination     cache: false,
  twilio-serverless-api:utils:pagination     useElectronNet: false,
  twilio-serverless-api:utils:pagination     baseUrl: [Getter/Setter],
  twilio-serverless-api:utils:pagination     auth: 'AC2e28b44893fdebc06eb44c73fa07c03b:[REDACTED]',
  twilio-serverless-api:utils:pagination     method: 'GET'
  twilio-serverless-api:utils:pagination   },
  twilio-serverless-api:utils:pagination   statusCode: 404,
  twilio-serverless-api:utils:pagination   statusMessage: 'NOT FOUND',
  twilio-serverless-api:utils:pagination   headers: {
  twilio-serverless-api:utils:pagination     date: 'Fri, 17 Apr 2020 10:26:22 GMT',
  twilio-serverless-api:utils:pagination     'content-type': 'application/json',
  twilio-serverless-api:utils:pagination     'content-length': '196',
  twilio-serverless-api:utils:pagination     connection: 'close',
  twilio-serverless-api:utils:pagination     'twilio-request-id': 'RQec0c62821ed04af6aedf21b7d40d4161',
  twilio-serverless-api:utils:pagination     'twilio-request-duration': '0.039',
  twilio-serverless-api:utils:pagination     'access-control-allow-origin': '*',
  twilio-serverless-api:utils:pagination     'access-control-allow-headers': 'Accept, Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since',
  twilio-serverless-api:utils:pagination     'access-control-allow-methods': 'GET, POST, DELETE, OPTIONS',
  twilio-serverless-api:utils:pagination     'access-control-expose-headers': 'ETag',
  twilio-serverless-api:utils:pagination     'access-control-allow-credentials': 'true',
  twilio-serverless-api:utils:pagination     'x-powered-by': 'AT-5000',
  twilio-serverless-api:utils:pagination     'x-shenanigans': 'none',
  twilio-serverless-api:utils:pagination     'x-home-region': 'us1',
  twilio-serverless-api:utils:pagination     'x-api-domain': 'serverless.twilio.com',
  twilio-serverless-api:utils:pagination     'strict-transport-security': 'max-age=31536000'
  twilio-serverless-api:utils:pagination   },
  twilio-serverless-api:utils:pagination   body: {
  twilio-serverless-api:utils:pagination     code: 20404,
  twilio-serverless-api:utils:pagination     message: 'The requested resource /Services/ZS5ad06539c2d5760d7b5f7218bc1f5649/Environments was not found',
  twilio-serverless-api:utils:pagination     more_info: 'https://www.twilio.com/docs/errors/20404',
  twilio-serverless-api:utils:pagination     status: 404
  twilio-serverless-api:utils:pagination   }
⠧ Configuring "dev" environment
  twilio-run:deploy GotError [HTTPError]: Response code 404 (NOT FOUND)
  twilio-run:deploy     at EventEmitter.<anonymous> (/Users/thorsten/.twilio-cli/node_modules/got/source/as-promise.js:74:19)
  twilio-run:deploy     at processTicksAndRejections (internal/process/task_queues.js:97:5) {
  twilio-run:deploy   name: 'HTTPError',
  twilio-run:deploy   host: undefined,
  twilio-run:deploy   hostname: 'serverless.twilio.com',
  twilio-run:deploy   method: 'POST',
  twilio-run:deploy   path: '/v1/Services/ZS5ad06539c2d5760d7b5f7218bc1f5649/Environments',
  twilio-run:deploy   socketPath: undefined,
  twilio-run:deploy   protocol: 'https:',
  twilio-run:deploy   url: 'https://serverless.twilio.com/v1/Services/ZS5ad06539c2d5760d7b5f7218bc1f5649/Environments',
  twilio-run:deploy   gotOptions: {
  twilio-run:deploy     path: '/v1/Services/ZS5ad06539c2d5760d7b5f7218bc1f5649/Environments',
  twilio-run:deploy     protocol: 'https:',
  twilio-run:deploy     hostname: 'serverless.twilio.com',
  twilio-run:deploy     hash: '',
  twilio-run:deploy     search: '',
  twilio-run:deploy     pathname: '/v1/Services/ZS5ad06539c2d5760d7b5f7218bc1f5649/Environments',
  twilio-run:deploy     href: 'https://serverless.twilio.com/v1/Services/ZS5ad06539c2d5760d7b5f7218bc1f5649/Environments',
  twilio-run:deploy     retry: {
  twilio-run:deploy       retries: [Function (anonymous)],
  twilio-run:deploy       methods: [Set],
  twilio-run:deploy       statusCodes: [Set],
  twilio-run:deploy       errorCodes: [Set]
  twilio-run:deploy     },
  twilio-run:deploy     headers: {
  twilio-run:deploy       'user-agent': 'twilio-serverless-api',
  twilio-run:deploy       accept: 'application/json',
  twilio-run:deploy       'accept-encoding': 'gzip, deflate',
  twilio-run:deploy       'content-type': 'application/x-www-form-urlencoded',
  twilio-run:deploy       'content-length': 105
  twilio-run:deploy     },
  twilio-run:deploy     hooks: {
  twilio-run:deploy       beforeError: [],
  twilio-run:deploy       init: [],
  twilio-run:deploy       beforeRequest: [],
  twilio-run:deploy       beforeRedirect: [],
  twilio-run:deploy       beforeRetry: [],
  twilio-run:deploy       afterResponse: []
  twilio-run:deploy     },
  twilio-run:deploy     decompress: true,
  twilio-run:deploy     throwHttpErrors: true,
  twilio-run:deploy     followRedirect: true,
  twilio-run:deploy     stream: false,
  twilio-run:deploy     form: true,
  twilio-run:deploy     json: true,
  twilio-run:deploy     cache: false,
  twilio-run:deploy     useElectronNet: false,
  twilio-run:deploy     baseUrl: [Getter/Setter],
  twilio-run:deploy     auth: 'AC2e28b44893fdebc06eb44c73fa07c03b:[REDACTED]',
  twilio-run:deploy     body: 'UniqueName=dev-environment&DomainSuffix=dev&FriendlyName=dev-environment+Environment+%28Created+by+CLI%29',
  twilio-run:deploy     method: 'POST'
  twilio-run:deploy   },
  twilio-run:deploy   statusCode: 404,
  twilio-run:deploy   statusMessage: 'NOT FOUND',
  twilio-run:deploy   headers: {
  twilio-run:deploy     date: 'Fri, 17 Apr 2020 10:26:23 GMT',
  twilio-run:deploy     'content-type': 'application/json',
  twilio-run:deploy     'content-length': '196',
  twilio-run:deploy     connection: 'close',
  twilio-run:deploy     'twilio-request-id': 'RQ8fa7f421ce794c31853764026a26b961',
  twilio-run:deploy     'twilio-request-duration': '0.029',
  twilio-run:deploy     'access-control-allow-origin': '*',
  twilio-run:deploy     'access-control-allow-headers': 'Accept, Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since',
  twilio-run:deploy     'access-control-allow-methods': 'GET, POST, DELETE, OPTIONS',
  twilio-run:deploy     'access-control-expose-headers': 'ETag',
  twilio-run:deploy     'access-control-allow-credentials': 'true',
  twilio-run:deploy     'x-powered-by': 'AT-5000',
  twilio-run:deploy     'x-shenanigans': 'none',
  twilio-run:deploy     'x-home-region': 'us1',
  twilio-run:deploy     'x-api-domain': 'serverless.twilio.com',
  twilio-run:deploy     'strict-transport-security': 'max-age=31536000'
  twilio-run:deploy   },
  twilio-run:deploy   body: {
  twilio-run:deploy     code: 20404,
  twilio-run:deploy     message: 'The requested resource /Services/ZS5ad06539c2d5760d7b5f7218bc1f5649/Environments was not found',
  twilio-run:deploy     more_info: 'https://www.twilio.com/docs/errors/20404',
  twilio-run:deploy     status: 404
  twilio-run:deploy   }
✖ Failed Deployment
 » twilio-cli encountered an unexpected error. To report this issue, execute the command with the "-l debug" flag, then copy the output to a new issue here: https://github.com/twilio/twilio-cli/issues

twilio-cli stuck on getting it work. problem with No such interface ?org.freedesktop.Secret.Collection? on object at path /org/freedesktop/secrets/collection/login

Issue Summary

A summary of the issue and the environment in which it occurs. If suitable, include the steps required to reproduce the bug. Please feel free to include screenshots, screencasts, code examples.

im ssh to my raspberry pi locally and trying to use twilio cli. i installed so much packages: dbus, dbus-x11, gnome-keyring and more. No matter how many error I resolve there is another error and I am stuck!

This is the error:

** Message: 04:54:16.449: Remote error from secret service: org.freedesktop.DBus.Error.UnknownMethod: No such interface ?org.freedesktop.Secret.Collection? on object at path /org/freedesktop/secrets/collection/login
» twilio-cli encountered an unexpected error. To report this issue, execute the command with the "-l debug" flag, then copy the output to a new issue here: https://github.com/twilio/twilio-cli/issues
[DEBUG] No such interface “org.freedesktop.Secret.Collection” on object at path /org/freedesktop/secrets/collection/login
[DEBUG] Error: No such interface “org.freedesktop.Secret.Collection” on object at path /org/freedesktop/secrets/collection/login

  • twilio-cli Version: twilio-cli/1.6.1 linux-arm node-v10.16.3
  • Node.js Version: v10.16.3

uname -m : armv6l
Raspbian 10

Is there a way to make it work or I just wasted my time for nothing?

Error in rtc:apps:video:deploy

Issue Summary

Got an error in the above command.

Steps to Reproduce

$:~ rbhargava$ twilio rtc:apps:video:deploy --authentication passcode -l debug
[DEBUG] Config File: /Users/rbhargava/.twilio-cli/config.json
[DEBUG] Using profile: rb
[DEBUG] -- BEGIN Twilio API Request --
[DEBUG] GET https://serverless.twilio.com/v1/Services
[DEBUG] User-Agent: @twilio/cli-core/4.6.0 (twilio-node/3.42.1, node.js v12.16.1, darwin 19.4.0 x64, rtc:apps:video:deploy)
[DEBUG] -- END Twilio API Request --
» twilio-cli encountered an unexpected error. To report this issue, execute the command with the "-l debug" flag, then copy the output to a new issue here: https://github.com/twilio/twilio-cli/issues
[DEBUG] self signed certificate in certificate chain
[DEBUG] Error: self signed certificate in certificate chain
at TLSSocket.onConnectSecure (_tls_wrap.js:1473:34)
at TLSSocket.emit (events.js:311:20)
at TLSSocket._finishInit (_tls_wrap.js:916:8)
at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:686:12)

Error when generating passcode

Issue Summary

I am attempting to generate a passcode as described here: https://github.com/twilio/twilio-video-app-android#deploy-twilio-access-token-server

Steps to Reproduce

  1. Run twilio rtc:apps:video:deploy --authentication passcode -l debug

Exception/Log

nicolas.dahlquist@mp-nicolasd-ml ~/w/twilio-video-app-react> twilio rtc:apps:video:deploy --authentication passcode -l debug
[DEBUG] Config File: /Users/nicolas.dahlquist/.twilio-cli/config.json
[DEBUG] Using profile: testaccount
[DEBUG] -- BEGIN Twilio API Request --
[DEBUG] GET https://serverless.twilio.com/v1/Services
[DEBUG] User-Agent: @twilio/cli-core/4.5.0 (twilio-node/3.41.1, node.js v13.11.0, darwin 18.7.0 x64, rtc:apps:video:deploy)
[DEBUG] -- END Twilio API Request --
[DEBUG] response.statusCode: 200
[DEBUG] response.headers: {"date":"Thu, 19 Mar 2020 04:41:33 GMT","content-type":"application/json; charset=utf-8; charset=utf-8","content-length":"1067","connection":"close","twilio-concurrent-requests":"1","twilio-request-id":"RQef3f3b82ff6d4f649c2934dca6d2d093","twilio-request-duration":"0.020","access-control-allow-origin":"*","access-control-allow-headers":"Accept, Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since","access-control-allow-methods":"GET, POST, DELETE, OPTIONS","access-control-expose-headers":"ETag","access-control-allow-credentials":"true","x-powered-by":"AT-5000","x-shenanigans":"none","x-home-region":"us1","x-api-domain":"serverless.twilio.com","strict-transport-security":"max-age=31536000"}
[DEBUG] -- BEGIN Twilio API Request --
[DEBUG] GET https://serverless.twilio.com/v1/Services/ZSd53e3a289ad47670c6ac2159386227ff/Environments
[DEBUG] User-Agent: @twilio/cli-core/4.5.0 (twilio-node/3.41.1, node.js v13.11.0, darwin 18.7.0 x64, rtc:apps:video:deploy)
[DEBUG] -- END Twilio API Request --
[DEBUG] response.statusCode: 200
[DEBUG] response.headers: {"date":"Thu, 19 Mar 2020 04:41:33 GMT","content-type":"application/json; charset=utf-8; charset=utf-8","content-length":"380","connection":"close","twilio-concurrent-requests":"1","twilio-request-id":"RQaba4f24e6cdc48c18fe38f89f33e7470","twilio-request-duration":"0.025","access-control-allow-origin":"*","access-control-allow-headers":"Accept, Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since","access-control-allow-methods":"GET, POST, DELETE, OPTIONS","access-control-expose-headers":"ETag","access-control-allow-credentials":"true","x-powered-by":"AT-5000","x-shenanigans":"none","x-home-region":"us1","x-api-domain":"serverless.twilio.com","strict-transport-security":"max-age=31536000"}
 » twilio-cli encountered an unexpected error. To report this issue, execute the command with the "-l debug" flag, then copy the output to a new issue here: https://github.com/twilio/twilio-cli/issues
[DEBUG] Cannot read property 'sid' of undefined
[DEBUG] TypeError: Cannot read property 'sid' of undefined
    at DeployCommand.getAppInfo (/Users/nicolas.dahlquist/.twilio-cli/node_modules/@twilio-labs/plugin-rtc/src/helpers.js:74:64)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async DeployCommand.run (/Users/nicolas.dahlquist/.twilio-cli/node_modules/@twilio-labs/plugin-rtc/src/commands/rtc/apps/video/deploy.js:18:21)
    at async DeployCommand._run (/Users/nicolas.dahlquist/.twilio-cli/node_modules/@oclif/command/lib/command.js:44:20)
    at async Config.runCommand (/usr/local/Cellar/twilio/1.11.0/libexec/node_modules/@oclif/config/lib/config.js:160:9)
    at async Main.run (/usr/local/Cellar/twilio/1.11.0/libexec/node_modules/@oclif/command/lib/main.js:21:9)
    at async Main._run (/usr/local/Cellar/twilio/1.11.0/libexec/node_modules/@oclif/command/lib/command.js:44:20)

Technical details:

  • twilio-cli version: twilio-cli/1.11.0
  • node version: node-v13.11.0
  • plugin-rtc: v0.1.2
  • darwin-x64

Cannot read property 'sid' of undefined

Issue Summary

Cannot deploy programmable video. Error: Cannot read property 'sid' of undefined
I'm trying to run the twilio-video-app-react but it just won't let me deploy it. I've correctly set up the twilio-cli and added the correct credentials. Not sure if this is the right repo for this issue but the log explicitly tells me to copy the output to a new issue here: https://github.com/twilio/twilio-cli/issues

Steps to Reproduce

git clone https://github.com/twilio/twilio-video-app-react.git
cd twilio-video-app-react
npm install -g twilio-cli
twilio login
twilio plugins:install @twilio-labs/plugin-rtc
npm run deploy:twilio-cli

Exception/Log

[DEBUG] Config File: /Users/agcty/.twilio-cli/config.json
[DEBUG] Using profile: shopassistant
[DEBUG] -- BEGIN Twilio API Request --
[DEBUG] GET https://serverless.twilio.com/v1/Services
[DEBUG] User-Agent: @twilio/cli-core/4.5.0 (twilio-node/3.41.1, node.js v13.11.0, darwin 19.3.0 x64, rtc:apps:video:deploy)
[DEBUG] -- END Twilio API Request --
[DEBUG] response.statusCode: 200
[DEBUG] response.headers: {"date":"Fri, 27 Mar 2020 17:23:15 GMT","content-type":"application/json; charset=utf-8; charset=utf-8","content-length":"1067","connection":"close","twilio-concurrent-requests":"1","twilio-request-id":"RQ502b86aaf3af4b46820ebfddeac9a188","twilio-request-duration":"0.049","access-control-allow-origin":"*","access-control-allow-headers":"Accept, Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since","access-control-allow-methods":"GET, POST, DELETE, OPTIONS","access-control-expose-headers":"ETag","access-control-allow-credentials":"true","x-powered-by":"AT-5000","x-shenanigans":"none","x-home-region":"us1","x-api-domain":"serverless.twilio.com","strict-transport-security":"max-age=31536000"}
[DEBUG] -- BEGIN Twilio API Request --
[DEBUG] GET https://serverless.twilio.com/v1/Services/ZS80c975abdb94b0a143cec0b06a598ecf/Environments
[DEBUG] User-Agent: @twilio/cli-core/4.5.0 (twilio-node/3.41.1, node.js v13.11.0, darwin 19.3.0 x64, rtc:apps:video:deploy)
[DEBUG] -- END Twilio API Request --
[DEBUG] response.statusCode: 200
[DEBUG] response.headers: {"date":"Fri, 27 Mar 2020 17:23:15 GMT","content-type":"application/json; charset=utf-8; charset=utf-8","content-length":"380","connection":"close","twilio-concurrent-requests":"1","twilio-request-id":"RQ0aed930783ee4caaa44fe4f1b9d8f3d8","twilio-request-duration":"0.021","access-control-allow-origin":"*","access-control-allow-headers":"Accept, Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since","access-control-allow-methods":"GET, POST, DELETE, OPTIONS","access-control-expose-headers":"ETag","access-control-allow-credentials":"true","x-powered-by":"AT-5000","x-shenanigans":"none","x-home-region":"us1","x-api-domain":"serverless.twilio.com","strict-transport-security":"max-age=31536000"}
 » twilio-cli encountered an unexpected error. To report this issue, execute the command with the "-l debug" flag, then copy the output to a new issue here: https://github.com/twilio/twilio-cli/issues
[DEBUG] Cannot read property 'sid' of undefined
[DEBUG] TypeError: Cannot read property 'sid' of undefined
    at DeployCommand.getAppInfo (/Users/agcty/.twilio-cli/node_modules/@twilio-labs/plugin-rtc/src/helpers.js:76:64)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async DeployCommand.run (/Users/agcty/.twilio-cli/node_modules/@twilio-labs/plugin-rtc/src/commands/rtc/apps/video/deploy.js:18:20)
    at async DeployCommand._run (/Users/agcty/.twilio-cli/node_modules/@oclif/command/lib/command.js:44:20)
    at async Config.runCommand (/usr/local/lib/node_modules/twilio-cli/node_modules/@oclif/config/lib/config.js:160:9)
    at async Main.run (/usr/local/lib/node_modules/twilio-cli/node_modules/@oclif/command/lib/main.js:21:9)
    at async Main._run (/usr/local/lib/node_modules/twilio-cli/node_modules/@oclif/command/lib/command.js:44:20)

Technical details:

  • twilio-cli version: twilio-cli/1.11.0 darwin-x64 node-v13.11.0
  • node version: v13.11.0
  • npm version: 6.14.4

Serverless plugin not added to autocomplete when installed

Issue Summary

When installing the twilio-labs\plugin-serverless installs the plugin correctly except it does not get added to my bash autocomplete. Checking the file at ~/.twilio-cli/autocomplete/functions/bash/twilio.bash does not show the serverless commands added.

All other autocompletion works, including the twilio-labs/plugin-watch plugin.

Steps to Reproduce

On a Mac using bash:

  1. Install the autocomplete functionality. I modified the twilio autocomplete command outpit slightly as I use bash_profile:
    printf "$(twilio autocomplete:script bash)" >> ~/.bash_profile
  2. Reload the bash_profile file using source ~/.bash_profile
  3. Autocomplete works as intended
  4. Install the serverless plugin using twilio plugins:install @twilio-labs/plugin-serverless
  5. Autocomplete still works, but serverless is not able to be autocompleted

I also tried repeating steps 1 and 2 after installing the plugin but it did not fix the problem

Technical details:

  • twilio-cli Version: twilio-cli/1.4.1 darwin-x64 node-v10.16.0
  • Node.js Version: v12.4.0
  • MacOS 10.14.6
  • iTerm 2 Bash

Install issues due to Python version

Error details:


> [email protected] install /Users/zhauser/code/twilio-cli/node_modules/keytar
> prebuild-install || node-gyp rebuild

prebuild-install WARN install No prebuilt binaries found (target=10.9.0 runtime=node arch=x64 platform=darwin)
gyp ERR! configure error
gyp ERR! stack Error: Python executable "/usr/local/opt/python/libexec/bin/python" is v3.6.5, which is not supported by gyp.
gyp ERR! stack You can pass the --python switch to point to Python >= v2.5.0 & < 3.0.0.
gyp ERR! stack     at PythonFinder.failPythonVersion (/Users/zhauser/.nvm/versions/node/v10.9.0/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:501:19)
gyp ERR! stack     at PythonFinder.<anonymous> (/Users/zhauser/.nvm/versions/node/v10.9.0/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:483:14)
gyp ERR! stack     at ChildProcess.exithandler (child_process.js:280:7)
gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
gyp ERR! stack     at maybeClose (internal/child_process.js:961:16)
gyp ERR! stack     at Socket.stream.socket.on (internal/child_process.js:380:11)
gyp ERR! stack     at Socket.emit (events.js:182:13)
gyp ERR! stack     at Pipe._handle.close (net.js:599:12)
gyp ERR! System Darwin 17.7.0
gyp ERR! command "/Users/zhauser/.nvm/versions/node/v10.9.0/bin/node" "/Users/zhauser/.nvm/versions/node/v10.9.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/zhauser/code/twilio-cli/node_modules/keytar
gyp ERR! node -v v10.9.0
gyp ERR! node-gyp -v v3.7.0
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `prebuild-install || node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/zhauser/.npm/_logs/2018-09-28T16_15_37_944Z-debug.log

My system is a Mac. With my PATH, python refers to python3. The only way I can get python2 at this point is directly running /usr/bin/python. Unfortunately I don't recall how I got my system to this state. It might have just been brew install python (which is now python3) though.

Possible fixes:

  • npm install --python=/path/to/python2 (tested and works)
  • have a python2 command, e.g. if (in my case) I'd run ln -s /usr/bin/python /usr/local/bin/python2 (not tested, but I saw some docs about gyp now looking for python2 first)

As a user, I should be prompted for my auth token when it is required, so that I can perform protected calls.

Certain API calls like twilio api:core:keys:create require the customer to provide an Auth Token.

The CLI does not persist the auth token, therefore what happens is the user receives the error:

Error code 20003 from Twilio: Authenticate. See https://www.twilio.com/docs/errors/20003 for more info.

I would like to be prompted for my auth token if I encounter error 20003 when I am logged in to the CLI.

"twilio-cli encountered an unexpected error." when logging in

Issue Summary

twilio login fails when attempting to login. I'm running on Ubuntu 18.04 on AWS.

ubuntu@highcpu:~$ twilio login -l debug
[DEBUG] Config File: /home/ubuntu/.twilio-cli/config.json
? Shorthand identifier for your profile: highcpu
You can find your Account SID and Auth Token at https://www.twilio.com/console
 » Your Auth Token will be used once to create an API Key for future CLI access to your Twilio Project, and then forgotten.
? The Account SID for your Twilio Project: AC6608blahblahblah
? Your Twilio Auth Token for your Twilio Project: [hidden]
[DEBUG] -- BEGIN Twilio API Request --
[DEBUG] GET https://api.twilio.com/2010-04-01/Accounts/AC6608blahblahblah.json
[DEBUG] User-Agent: @twilio/cli-core/4.1.0 (twilio-node/3.35.0, node.js v12.10.0, linux 4.15.0-1050-aws x64, login)
[DEBUG] -- END Twilio API Request --
[DEBUG] response.statusCode: 200
[DEBUG] response.headers: {"date":"Mon, 30 Sep 2019 08:27:29 GMT","content-type":"application/json; charset=utf-8","content-length":"2261","connection":"close","last-modified":"Fri, 27 Sep 2019 20:11:55 +0000","twilio-concurrent-requests":"1","etag":"89c1bc3eb996c7dd6c4db5712d64c633","twilio-request-id":"RQ00dbced70bb44b0688ed3279223514e4","twilio-request-duration":"0.025","access-control-allow-origin":"*","access-control-allow-headers":"Accept, Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since","access-control-allow-methods":"GET, POST, DELETE, OPTIONS","access-control-expose-headers":"ETag","access-control-allow-credentials":"true","x-powered-by":"AT-5000","x-shenanigans":"none","x-home-region":"us1","x-api-domain":"api.twilio.com","strict-transport-security":"max-age=31536000"}
[DEBUG] -- BEGIN Twilio API Request --
[DEBUG] POST https://api.twilio.com/2010-04-01/Accounts/AC6608blahblahblah/Keys.json
[DEBUG] Form data:
[DEBUG] {"FriendlyName":"twilio-cli for ubuntu on highcpu"}
[DEBUG] User-Agent: @twilio/cli-core/4.1.0 (twilio-node/3.35.0, node.js v12.10.0, linux 4.15.0-1050-aws x64, login)
[DEBUG] -- END Twilio API Request --
[DEBUG] response.statusCode: 201
[DEBUG] response.headers: {"date":"Mon, 30 Sep 2019 08:27:30 GMT","content-type":"application/json; charset=utf-8","content-length":"246","connection":"close","twilio-concurrent-requests":"1","twilio-request-id":"RQ91996bfa46694fc6b9a7ca50dd83f903","twilio-request-duration":"0.031","access-control-allow-origin":"*","access-control-allow-headers":"Accept, Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since","access-control-allow-methods":"GET, POST, DELETE, OPTIONS","access-control-expose-headers":"ETag","access-control-allow-credentials":"true","x-powered-by":"AT-5000","x-shenanigans":"none","x-home-region":"us1","x-api-domain":"api.twilio.com","strict-transport-security":"max-age=31536000"}
[DEBUG] {"sid":"SKcd369339206b20f2fcaa18bed701413e","friendlyName":"twilio-cli for ubuntu on highcpu","dateCreated":"2019-09-30T08:27:30.000Z","dateUpdated":"2019-09-30T08:27:30.000Z","secret":"0jf7..."}
 » twilio-cli encountered an unexpected error. To report this issue, execute the command with the "-l debug" flag, then copy the output to a new issue here: https://github.com/twilio/twilio-cli/issues
[DEBUG] Cannot autolaunch D-Bus without X11 $DISPLAY
[DEBUG] Error: Cannot autolaunch D-Bus without X11 $DISPLAY

ubuntu@highcpu:~$ node --version
v12.10.0
ubuntu@highcpu:~$ npm --version
6.11.3
ubuntu@highcpu:~$ twilio --version
twilio-cli/1.6.0 linux-x64 node-v12.10.0

Steps to Reproduce

  1. Attempt login.
  2. Watch everything crash and burn.

Technical details:

  • twilio-cli Version: twilio-cli/1.6.0 linux-x64 node-v12.10.0
  • Node.js Version: v12.10.0

twilio phone-numbers:update issue

This is the debug output

[DEBUG] Config File: /Users/cchambers/.twilio-cli/config.json
[DEBUG] Using profile: cory
[DEBUG] -- BEGIN Twilio API Request --
[DEBUG] GET https://api.twilio.com/2010-04-01/Accounts/ACe66f201ae4c434aa11b795de867b38f2/IncomingPhoneNumbers.json
[DEBUG] Querystring:
[DEBUG] {"PhoneNumber":"+14104497866"}
[DEBUG] User-Agent: @twilio/cli-core/3.0.2 (twilio-node/3.33.3, node.js v10.16.0, darwin 17.7.0 x64, phone-numbers:update)
[DEBUG] -- END Twilio API Request --
[DEBUG] response.statusCode: 200
[DEBUG] response.headers: {"date":"Tue, 06 Aug 2019 17:06:54 GMT","content-type":"application/json; charset=utf-8","content-length":"1499","connection":"close","twilio-concurrent-requests":"1","twilio-request-id":"RQ552c74c088aa4a75a17734c8aec66ad3","twilio-request-duration":"0.174","access-control-allow-origin":"*","access-control-allow-headers":"Accept, Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since","access-control-allow-methods":"GET, POST, DELETE, OPTIONS","access-control-expose-headers":"ETag","access-control-allow-credentials":"true","x-powered-by":"AT-5000","x-shenanigans":"none","x-home-region":"us1","x-api-domain":"api.twilio.com","strict-transport-security":"max-age=31536000"}
» twilio-cli encountered an unexpected error. To report this issue, execute the command with the "-l debug" flag, then copy the output to a new issue here: https://github.com/twilio/twilio-cli/issues
[DEBUG] Cannot read property 'err' of undefined
[DEBUG] TypeError: Cannot read property 'err' of undefined
at NumberUpdate.createTunnel (/usr/local/Cellar/twilio/1.4.1/libexec/src/commands/phone-numbers/update.js:80:48)
at process._tickCallback (internal/process/next_tick.js:68:7)

Error on twilio phone-numbers:update

OS:Win10

C:\Users[redact]>twilio phone-numbers:update +1[redact] --sms-url=http://localhost:4040 -l debug
[DEBUG] Config File: C:\Users[redact].twilio-cli\config.json
[DEBUG] Using profile: AC143d094fbc8ef8fc781423285788acaa
[DEBUG] -- BEGIN Twilio API Request --
[DEBUG] GET https://api.twilio.com/2010-04-01/Accounts/AC143d094fbc8ef8fc781423285788acaa/IncomingPhoneNumbers.json
[DEBUG] Querystring:
[DEBUG] {"PhoneNumber":"+1[redact]"}
[DEBUG] User-Agent: @twilio/cli-core/3.0.2 (twilio-node/3.33.3, node.js v10.16.1, win32 10.0.18362 x64, phone-numbers:update)
[DEBUG] -- END Twilio API Request --
[DEBUG] response.statusCode: 200
[DEBUG] response.headers: {"date":"Mon, 05 Aug 2019 20:20:51 GMT","content-type":"application/json; charset=utf-8","content-length":"1578","connection":"close","twilio-concurrent-requests":"1","twilio-request-id":"RQe0306e360458403ea3b69a288858260c","twilio-request-duration":"0.084","access-control-allow-origin":"*","access-control-allow-headers":"Accept, Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since","access-control-allow-methods":"GET, POST, DELETE, OPTIONS","access-control-expose-headers":"ETag","access-control-allow-credentials":"true","x-powered-by":"AT-5000","x-shenanigans":"none","x-home-region":"us1","x-api-domain":"api.twilio.com","strict-transport-security":"max-age=31536000"}
» twilio-cli encountered an unexpected error. To report this issue, execute the command with the "-l debug" flag, then copy the output to a new issue here: https://github.com/twilio/twilio-cli/issues
[DEBUG] Cannot read property 'err' of undefined
[DEBUG] TypeError: Cannot read property 'err' of undefined
at NumberUpdate.createTunnel (C:\Users[redact]\AppData\Roaming\npm\node_modules\twilio-cli\src\commands\phone-numbers\update.js:80:48)
at process._tickCallback (internal/process/next_tick.js:68:7)

Add Node.js version mismatch check and remove fixed Node.js from brew

What?

We should check if the Twilio CLI was installed with a different Node.js version than the current one on the system and provide an option like:

You are currently using Node.js version 10.12 but you installed the Twilio CLI with Node.js 8.10. We have to update some of the dependencies to fix this mismatch. Press Y to update or N to exit.

If confirmed it should kickoff a rebuild of the native dependencies using npm rebuild

Why?

Right now when you install the Twilio CLI via Homebrew you'll install a separate version of Node.js for the CLI. That's done to avoid the conflict when the native dependency keytar was installed with a different Node.js version than the one currently being used.

While it's great that people do not have to have Node.js installed by default, we shouldn't install Node.js if the user already has it installed. Additionally the Serverless Toolkit for example requires npm in your path anyways which it currently does not have. It also causes confusions as shown in this issue of the Serverless Toolkit

Secure credential storage failed to load.

Issue Summary

Sorry to be coming at ya'll with more bugs, this is a follow-up to my last issue (#134) which was fixed in the release from yesterday. Seems like the API Keys are now being created properly but now they can't be stored.

Steps to Reproduce

  1. twilio login
  2. follow prompts, enter identifier for profile, account sid, auth token, etc...
  3. see error

Technical details:

  • twilio version output: twilio-cli/1.8.0 darwin-x64 node-v10.16.0
  • Command output with debug logging enabled (adding -l debug to the end of the command):
[DEBUG] Failed to find the keytar module with the CLI: Cannot find module 'keytar'
[DEBUG] Failed to find the keytar module anywhere: Cannot find module 'keytar'
 » Secure credential storage failed to load.

It should be noted that up until that point the API keys do seem to be created now, and I can find them in my Twilio console (https://www.twilio.com/console/project/api-keys), they just aren't being

Creating a new Conversation using CLI should return Chat Service SID

The Conversations Quickstart guide suggests the following command for creating a conversation using the CLI

twilio api:conversations:v1:conversations:create \
--friendly-name "My First Conversation"

However the response back when running this command doesn't including the Chat Service SID which the guide asks you to copy and I believe it should.

local flask app not receiving incoming twilio sms messages

Issue Summary

A summary of the issue and the environment in which it occurs. If suitable, include the steps required to reproduce the bug. Please feel free to include screenshots, screencasts, or code examples.

Steps to Reproduce

I am working on a very basic flask app to receive SMS, and to respond based on the content of the text that is received.

I have already tested to make sure that I can purely send (not worrying about the content that is received) messages. However, now, not even that is working when I send a text to that number.

In one window I am running
twilio phone-numbers:update "+xxxxxxxxxxx" --sms-url="http://localhost:5000/sms"

In the other I am running my run.py script which litreally just looks like this

Code Snippet

@app.route("/sms", methods=['GET', 'POST'])
def incoming_sms():
    print("hello")
    """ Get the incoming message the user sent our Twilio number """
    resp = MessagingResponse()

    # Add a text message
    msg = resp.message("The Robots are coming! Head for the hills!")

    return str(resp)

Not even printing the "hello" message in the debugger.

I am wondering if the issue is with the configuration settings I have with the Twilio console, but I am not sure... The reason I wonder this is because if I hit the localhost address from my browser, I am able to hit the debugger.

I copied the ngrok tunnel public URL and put it https://www.twilio.com/console/phone-numbers/xxxxidxxxxx under "A message comes in." I also put the pubilc url it https://www.twilio.com/console/sms/services/xxxxxxiexxxx as well under "Send an incoming message webhook" under inbound settings. Not sure if I had to set both of those up, because I wasn't really sure.

Exception/Log

No exceptions at all! No error. Nothing happens.

Technical details:

  • twilio-python version: twilio-cli/1.11.0 linux-x64 node-v12.16.1
  • python version: Python 3.7.7
    I am on Windows Subsystem for linux (ubuntu)

Error using twilio-cli to get the access token for the Video app

Issue Summary

A summary of the issue and the environment in which it occurs. If suitable, include the steps required to reproduce the bug. Please feel free to include screenshots, screencasts, or code examples.
logged in a [email protected] account

Steps to Reproduce

  1. Ran: twilio plugins:install @twilio-labs/plugin-rtc
  2. Run twilio rtc:apps:video:deploy --authentication passcode -l debug

Code Snippet

# paste code here

Exception/Log

# twilio rtc:apps:video:deploy --authentication passcode -l debug
[DEBUG] Config File: /Users/sandeep/.twilio-cli/config.json
[DEBUG] Using profile: BuzzVideo
[DEBUG] -- BEGIN Twilio API Request --
[DEBUG] GET https://serverless.twilio.com/v1/Services
[DEBUG] User-Agent: @twilio/cli-core/4.5.0 (twilio-node/3.41.1, node.js v8.9.0, darwin 18.7.0 x64, rtc:apps:video:deploy)
[DEBUG] -- END Twilio API Request --
[DEBUG] response.statusCode: 200
[DEBUG] response.headers: {"date":"Sun, 22 Mar 2020 13:04:03 GMT","content-type":"application/json; charset=utf-8; charset=utf-8","content-length":"1067","connection":"close","twilio-concurrent-requests":"1","twilio-request-id":"RQ8d6ff73aa24a47e4b1d565872a4a65bc","twilio-request-duration":"0.025","access-control-allow-origin":"*","access-control-allow-headers":"Accept, Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since","access-control-allow-methods":"GET, POST, DELETE, OPTIONS","access-control-expose-headers":"ETag","access-control-allow-credentials":"true","x-powered-by":"AT-5000","x-shenanigans":"none","x-home-region":"us1","x-api-domain":"serverless.twilio.com","strict-transport-security":"max-age=31536000"}
[DEBUG] -- BEGIN Twilio API Request --
[DEBUG] GET https://serverless.twilio.com/v1/Services/ZS5e20b55b32447b80f331ca528d03ff04/Environments
[DEBUG] User-Agent: @twilio/cli-core/4.5.0 (twilio-node/3.41.1, node.js v8.9.0, darwin 18.7.0 x64, rtc:apps:video:deploy)
[DEBUG] -- END Twilio API Request --
[DEBUG] response.statusCode: 200
[DEBUG] response.headers: {"date":"Sun, 22 Mar 2020 13:04:03 GMT","content-type":"application/json; charset=utf-8; charset=utf-8","content-length":"380","connection":"close","twilio-concurrent-requests":"1","twilio-request-id":"RQ6c394ef89af440d586781014a1da2204","twilio-request-duration":"0.023","access-control-allow-origin":"*","access-control-allow-headers":"Accept, Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since","access-control-allow-methods":"GET, POST, DELETE, OPTIONS","access-control-expose-headers":"ETag","access-control-allow-credentials":"true","x-powered-by":"AT-5000","x-shenanigans":"none","x-home-region":"us1","x-api-domain":"serverless.twilio.com","strict-transport-security":"max-age=31536000"}
 » twilio-cli encountered an unexpected error. To report this issue, execute the command with the "-l debug" flag, then copy the output to a new issue here: https://github.com/twilio/twilio-cli/issues
[DEBUG] Cannot read property 'sid' of undefined
[DEBUG] TypeError: Cannot read property 'sid' of undefined
    at DeployCommand.getAppInfo (/Users/sandeep/.twilio-cli/node_modules/@twilio-labs/plugin-rtc/src/helpers.js:74:64)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)

Technical details:

  • twilio-cli version:
  • node version:
  • Command output with debug logging enabled (adding -l debug to the end of the command):
# paste output here

npm deployment fails (npm run deploy:twilio-cli) with errno 1

Issue Summary

I'm just trying to follow your "Deploy your own video collaboration app in five minutes or less" instructions for the ReactJs web app, and it fails when I run npm run deploy:twilio-cli

Steps to Reproduce

  1. git clone https://github.com/twilio/twilio-video-app-react
  2. cd twilio-video-app-react
  3. npm install
  4. npm install twilio-cli -g
  5. twilio login
  6. twilio plugins:install @twilio-labs/plugin-rtc
  7. npm run deploy:twilio-cli

Exception/Log

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] deploy:twilio-cli: `cross-env REACT_APP_SET_AUTH=passcode npm run build && twilio rtc:apps:video:deploy --authentication=passcode --app-directory ./build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] deploy:twilio-cli script.

Technical details:

  • twilio-cli version: 2.0.0
  • macOS: darwin-x64
  • node version: node-v13.12.0
  • Command output with debug logging enabled (adding -l debug to the end of the command didn't work -- failed with "Error: Unexpected argument: debug," so I'm pasting in the npm debug log):
0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli   '/usr/local/Cellar/node/13.12.0/bin/node',
1 verbose cli   '/usr/local/bin/npm',
1 verbose cli   'run',
1 verbose cli   'deploy:twilio-cli',
1 verbose cli   '--',
1 verbose cli   '--override'
1 verbose cli ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [
4 verbose run-script   'predeploy:twilio-cli',
4 verbose run-script   'deploy:twilio-cli',
4 verbose run-script   'postdeploy:twilio-cli'
4 verbose run-script ]
5 info lifecycle [email protected]~predeploy:twilio-cli: [email protected]
6 info lifecycle [email protected]~deploy:twilio-cli: [email protected]
7 verbose lifecycle [email protected]~deploy:twilio-cli: unsafe-perm in lifecycle true
8 verbose lifecycle [email protected]~deploy:twilio-cli: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/michael/source/twilio-video-app-react/node_modules/.bin::/usr/local/bin:/usr/local/Cellar/[email protected]/9.6.11/bin:/usr/local/opt/node/bin:/Users/michael/Library/Android/sdk/platform-tools:/Users/michael/Library/Android/sdk/::/usr/local/bin:/usr/local/Cellar/[email protected]/9.6.11/bin:/usr/local/opt/node/bin:/Users/michael/Library/Android/sdk/platform-tools:/Users/michael/Library/Android/sdk/:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin/node:/usr/local/bin/npm:/Applications/Wireshark.app/Contents/MacOS
9 verbose lifecycle [email protected]~deploy:twilio-cli: CWD: /Users/michael/source/twilio-video-app-react
10 silly lifecycle [email protected]~deploy:twilio-cli: Args: [
10 silly lifecycle   '-c',
10 silly lifecycle   'cross-env REACT_APP_SET_AUTH=passcode npm run build && twilio rtc:apps:video:deploy --authentication=passcode --app-directory ./build "--override"'
10 silly lifecycle ]
11 silly lifecycle [email protected]~deploy:twilio-cli: Returned: code: 1  signal: null
12 info lifecycle [email protected]~deploy:twilio-cli: Failed to exec deploy:twilio-cli script
13 verbose stack Error: [email protected] deploy:twilio-cli: `cross-env REACT_APP_SET_AUTH=passcode npm run build && twilio rtc:apps:video:deploy --authentication=passcode --app-directory ./build "--override"`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
13 verbose stack     at EventEmitter.emit (events.js:315:20)
13 verbose stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack     at ChildProcess.emit (events.js:315:20)
13 verbose stack     at maybeClose (internal/child_process.js:1026:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
14 verbose pkgid [email protected]
15 verbose cwd /Users/michael/source/twilio-video-app-react
16 verbose Darwin 19.4.0
17 verbose argv "/usr/local/Cellar/node/13.12.0/bin/node" "/usr/local/bin/npm" "run" "deploy:twilio-cli" "--" "--override"
18 verbose node v13.12.0
19 verbose npm  v6.14.4
20 error code ELIFECYCLE
21 error errno 1
22 error [email protected] deploy:twilio-cli: `cross-env REACT_APP_SET_AUTH=passcode npm run build && twilio rtc:apps:video:deploy --authentication=passcode --app-directory ./build "--override"`
22 error Exit status 1
23 error Failed at the [email protected] deploy:twilio-cli script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]```

Allow to send emails without attachment without entering interactive mode

It's not possible to send emails without attachment without entering interactive mode

When scripting email operations I'd like to send emails. The command

twilio email:send --from=no-reply@... --to=stefanjudis@... --subject="test" --text="test"

doesn't terminate but rather asks interactively if I want to send an attachment, too.

Steps to Reproduce

  1. Run the described command 👆 and try to send an email without entering the interactive question.

Any other information you want to share that is relevant to the issue being reported. Especially, why do you consider this to be a bug? What do you expect to happen instead?

This behavior prevents me from automating email operations (there are ways around that but yeah...). As an email attachment is optional I didn't expect this question with from, to and text defined. :)

Thanks a bunch for looking into this. 😊

Technical details:

  • twilio-cli Version: 1.4.0
  • Node.js Version: 12.4.0

Flex Configuration update API unsupported

Issue Summary

Flex Configuration API has an update operation which accepts a JSON body only. The Twilio CLI doesn't currently support setting a JSON request body via a command line parameter

Steps to Reproduce

  1. Attempt to update the Flex Configuration via the Twilio CLI using the command:
    twilio api:flex:v1:configuration:update

  2. Error message is returned (see debug output below)

  3. Help does not provide any clue to how a body may be specified.

Example debug output:
$ twilio api:flex:v1:configuration:update -l debug [DEBUG] Config File: /Users/ckendall/.twilio-cli/config.json [DEBUG] Using profile: Flex Demo [DEBUG] Provided flags: {"cli-log-level":"debug","properties":"status,uiLanguage,uiVersion,serviceVersion","skip-parameter-validation":false,"cli-output-format":"columns"} [DEBUG] domainName=flex, path=/v1/Configuration, actionName=update [DEBUG] -- BEGIN Twilio API Request -- [DEBUG] post https://flex-api.twilio.com/v1/Configuration [DEBUG] Form data: [DEBUG] {} [DEBUG] User-Agent: @twilio/cli-core/3.0.3 (twilio-api-client/3.0.3, node.js v10.16.0, darwin 18.7.0 x64, api:flex:v1:configuration:update) [DEBUG] -- END Twilio API Request -- [DEBUG] response.statusCode: 415 [DEBUG] response.headers: {"date":"Tue, 03 Sep 2019 02:54:07 GMT","content-type":"application/json; charset=utf-8","content-length":"172","connection":"close","twilio-request-id":"RQ420d91eafe9147ff85dd42a480983399","twilio-request-duration":"0.033","access-control-allow-origin":"*","access-control-allow-headers":"Accept, Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since","access-control-allow-methods":"GET, POST, DELETE, OPTIONS","access-control-expose-headers":"ETag","access-control-allow-credentials":"true","x-powered-by":"AT-5000","x-shenanigans":"none","x-home-region":"us1","x-api-domain":"flex-api.twilio.com","strict-transport-security":"max-age=31536000"} » Error code 20415 from Twilio: The server does not support the media type transmitted in the request.. See https://www.twilio.com/docs/errors/20415 for more info. [DEBUG] TwilioCliError: Error code 20415 from Twilio: The server does not support the media type transmitted in the request.. See https://www.twilio.com/docs/errors/20415 for more info. at CliRequestClient.request (/usr/local/Cellar/twilio/1.4.2/libexec/node_modules/@twilio/cli-core/src/services/cli-http-client.js:88:15) at process._tickCallback (internal/process/next_tick.js:68:7)

List messages date filters do not work

Issue Summary

I'm trying to download SMS messages using a specific date range. The example listed in the docs here to filter SMS messages by date does not work. Futhermore, changing PageSize doesn't look to be an option, which severely changes the speed of downloading large ranges of messages.

Steps to Reproduce

# following example in the docs...
twilio api:core:messages:list --date-sent-after 2019-08-08
# Error: Unexpected arguments: --date-sent-after, 2019-08-08

# attempting to use --date-sent parameter returned from help...
twilio api:core:messages:list --date-sent ">=2019-08-08" -l debug
# {"DateSent":">=2019-08-08"} issues in the request
# Error code 20001 from Twilio: Invalid date value.

# attempting to page the result...
twilio api:core:messages:list --date-sent 2019-08-08 -l debug
# PageSize=50 issued in the request
# --page-size 50 returns unexpected argument error

Technical details:

  • twilio-cli Version:1.4.1
  • Node.js Version: 10.16.0

Twilio CLI error after rerun "Twilio phone-numbers:update" on Macos

Issue Summary

A summary of the issue and the environment in which it occurs. If suitable, include the steps required to reproduce the bug. Please feel free to include screenshots, screencasts, or code examples.

Steps to Reproduce

I was following the tutorial Twilio for NodeJS.

I run the project and after that I worte in the terminal twilio phone-numbers:update "+17048692621" --sms-url="http://localhost:3000/sms" -l debug. The command works perfect but I saw that I made a mistake in the port of the sms-url the port was 1337 so I fixed and rerun the command twilio phone-numbers:update "+17048692621" --sms-url="http://localhost:1337/sms" -l debug

And I got the error.
`

Code Snippet

var router = express.Router();
const MessagingResponse = require('twilio').twiml.MessagingResponse;

/* GET home page. */
router.get('/', function(req, res, next) {
  res.render('index', { title: 'Express' });
});

router.post('/sms', (req, res) => {
  console.log('arrive');
  const twiml = new MessagingResponse();

  twiml.message('The Robots are coming! Head for the hills!');

  res.writeHead(200, {'Content-Type': 'text/xml'});
  res.end(twiml.toString());
});

module.exports = router;

Exception/Log

events.js:187
      throw er; // Unhandled 'error' event
      ^

Error: spawn ./ngrok ENOENT
    at Process.ChildProcess._handle.onexit (internal/child_process.js:264:19)
    at onErrorNT (internal/child_process.js:456:16)
    at processTicksAndRejections (internal/process/task_queues.js:80:21)
Emitted 'error' event on ChildProcess instance at:
    at Process.ChildProcess._handle.onexit (internal/child_process.js:270:12)
    at onErrorNT (internal/child_process.js:456:16)
    at processTicksAndRejections (internal/process/task_queues.js:80:21) {
  errno: 'ENOENT',
  code: 'ENOENT',
  syscall: 'spawn ./ngrok',
  path: './ngrok',
  spawnargs: [ 'start', '--none', '--log=stdout' ]
}

Technical details:

  • MacOs: Mojave
  • twilio-cli version: 1.12.0
  • node version: v12.13.0
  • Command output with debug logging enabled (adding -l debug to the end of the command):
a483e79ff8f8:untitled wilfrelo$ twilio phone-numbers:update "+17048692621" --sms-url="http://localhost:1337/sms" -l debug
[DEBUG] Config File: /Users/wilfrelo/.twilio-cli/config.json
[DEBUG] Using profile: Hackatoon
[DEBUG] -- BEGIN Twilio API Request --
[DEBUG] GET https://api.twilio.com/2010-04-01/Accounts/AC7e5956a37537947f10ce99bb22e77e8b/IncomingPhoneNumbers.json
[DEBUG] Querystring:
[DEBUG] {"PhoneNumber":"+17048692621"}
[DEBUG] User-Agent: @twilio/cli-core/4.6.0 (twilio-node/3.42.0, node.js v12.13.0, darwin 18.7.0 x64, phone-numbers:update)
[DEBUG] -- END Twilio API Request --
[DEBUG] response.statusCode: 200
[DEBUG] response.headers: {"date":"Sat, 04 Apr 2020 23:31:40 GMT","content-type":"application/json; charset=utf-8","content-length":"1597","connection":"close","twilio-concurrent-requests":"1","twilio-request-id":"RQ1a6e3ec33b6e44fdb98019277ce219ed","twilio-request-duration":"0.120","access-control-allow-origin":"*","access-control-allow-headers":"Accept, Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since","access-control-allow-methods":"GET, POST, DELETE, OPTIONS","access-control-expose-headers":"ETag","access-control-allow-credentials":"true","x-powered-by":"AT-5000","x-shenanigans":"none","x-home-region":"us1","x-api-domain":"api.twilio.com","strict-transport-security":"max-age=31536000"}
events.js:187
      throw er; // Unhandled 'error' event
      ^

Error: spawn ./ngrok ENOENT
    at Process.ChildProcess._handle.onexit (internal/child_process.js:264:19)
    at onErrorNT (internal/child_process.js:456:16)
    at processTicksAndRejections (internal/process/task_queues.js:80:21)
Emitted 'error' event on ChildProcess instance at:
    at Process.ChildProcess._handle.onexit (internal/child_process.js:270:12)
    at onErrorNT (internal/child_process.js:456:16)
    at processTicksAndRejections (internal/process/task_queues.js:80:21) {
  errno: 'ENOENT',
  code: 'ENOENT',
  syscall: 'spawn ./ngrok',
  path: './ngrok',
  spawnargs: [ 'start', '--none', '--log=stdout' ]
}

Unable to update phone-number property

Issue Summary

Running the TwilioQuest 3, Twilio-CLI mission to set up a webhook, the CLI command returned an error.

Steps to Reproduce

  1. In TwilioQuest 3, in the twilio-cli missions, run the Set up a webhook mission.
  2. Run the sample code for that mission in the TQ3 host
  3. Test the server is working via REST tool (e.g. Postman)
  4. Run the twilio-cli command to update a phone number to use this server
twilio phone-numbers:update +14079102307 --sms-url="http://localhost:8767/sms" --sms-method=POST --voice-url="http://localhost:8767/voice" --voice-method=POST
  1. Get this response:
 » twilio-cli encountered an unexpected error. To report this issue, execute the command with the "-l debug" flag, then copy the output to a new issue here: https://github.com/twilio/twilio-cli/issues
  1. Run command with debug output and get this response
 [DEBUG] Config File: /Users/rowatson/.twilio-cli/config.json
[DEBUG] Using project: TQ Project 1
[DEBUG] -- BEGIN Twilio API Request --
[DEBUG] GET https://api.twilio.com/2010-04-01/Accounts/ACbbfe799d2a5b5412d13f36c066e20cc1/IncomingPhoneNumbers.json
[DEBUG] Querystring:
[DEBUG] {"PhoneNumber":"+14079102307"}
[DEBUG] User-Agent: @twilio/cli-core/2.0.3 (twilio-node/3.33.1, node.js v10.16.0, darwin 16.7.0 x64, phone-numbers:update)
[DEBUG] -- END Twilio API Request --

 » getaddrinfo ENOTFOUND api.twilio.com api.twilio.com:443
[DEBUG] TwilioCliError: getaddrinfo ENOTFOUND api.twilio.com api.twilio.com:443
    at IncomingPhoneNumberHelper.findPhoneNumber (/usr/local/Cellar/twilio/1.3.4/libexec/src/services/resource-helpers/api/v2010/incoming-phone-number.js:26:13)
    at process._tickCallback (internal/process/next_tick.js:68:7)
  1. In a previous attempt, I got this response:
4934:~ rowatson$ twilio phone-numbers:update +14079102307 --sms-url='http://localhost:8767/sms' -l debug --voice-url='http://localhost:8767/voice' --sms-method=POST --voice-method=POST
[DEBUG] Config File: /Users/rowatson/.twilio-cli/config.json
[DEBUG] Using project: TQ Project 1
[DEBUG] -- BEGIN Twilio API Request --
[DEBUG] GET https://api.twilio.com/2010-04-01/Accounts/ACbbfe799d2a5b5412d13f36c066e20cc1/IncomingPhoneNumbers.json
[DEBUG] Querystring:
[DEBUG] {"PhoneNumber":"+14079102307"}
[DEBUG] User-Agent: @twilio/cli-core/2.0.3 (twilio-node/3.33.1, node.js v10.16.0, darwin 16.7.0 x64, phone-numbers:update)
[DEBUG] -- END Twilio API Request --
[DEBUG] response.statusCode: 200
[DEBUG] response.headers: {"date":"Fri, 19 Jul 2019 16:56:05 GMT","content-type":"application/json; charset=utf-8","content-length":"1499","connection":"close","twilio-concurrent-requests":"1","twilio-request-id":"RQff893d6431874191939882bba867af22","twilio-request-duration":"0.123","access-control-allow-origin":"*","access-control-allow-headers":"Accept, Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since","access-control-allow-methods":"GET, POST, DELETE, OPTIONS","access-control-expose-headers":"ETag","access-control-allow-credentials":"true","x-powered-by":"AT-5000","x-shenanigans":"none","x-home-region":"us1","x-api-domain":"api.twilio.com","strict-transport-security":"max-age=31536000"}
 » twilio-cli encountered an unexpected error. To report this issue, execute the command with the "-l debug" flag, then copy the output to a new issue here: https://github.com/twilio/twilio-cli/issues
[DEBUG] socket hang up
[DEBUG] Error: socket hang up
    at createHangUpError (_http_client.js:323:15)
    at Socket.socketOnEnd (_http_client.js:426:23)
    at Socket.emit (events.js:203:15)
    at endReadableNT (_stream_readable.js:1129:12)
    at process._tickCallback (internal/process/next_tick.js:63:19)

EXPECTED BEHAVIOR:

  • Phone number properties to be updated.

Technical details:

  • twilio-cli Version:

    VERSION
    twilio-cli/1.3.4 darwin-x64 node-v10.16.0

  • Node.js Version: 8.12.0

twilio login returns Could not create an API Key.

Issue Summary

twilio login returns with Could not create an API Key. despite simply copying my account SID and auth token from console and pasting them in.

Steps to Reproduce

  1. twilio login
  2. enter nickname for the login such as brodan
  3. paste Account SID from Twilio console
  4. paste auth token from Twilio console

Technical details:

  • twilio version output: twilio-cli/1.7.2 darwin-x64 node-v10.16.0
  • node --version output: v12.12.0
  • osx version: 10.14.6
  • Command output with debug logging enabled (adding -l debug to the end of the command):
$ twilio login -l debug
[DEBUG] Config File: /Users/christopherhranj/.twilio-cli/config.json
? Shorthand identifier for your profile: brodan
? Account credentials are currently stored in environment variables and will take precedence over the "brodan" profile when connecting to Twilio, unless the "brodan" profile is explicitly specified. Continue setting up "brodan" prof
ile? Yes
You can find your Account SID and Auth Token at https://www.twilio.com/console
 » Your Auth Token will be used once to create an API Key for future CLI access to your Twilio Project, and then forgotten.
? The Account SID for your Twilio Project: ACxxxxxxxxxxxxxxxxxxxx
? Your Twilio Auth Token for your Twilio Project: [hidden]
[DEBUG] -- BEGIN Twilio API Request --
[DEBUG] GET https://api.twilio.com/2010-04-01/Accounts/ACxxxxxxxxxxxxxxxxxxaee403b545.json
[DEBUG] User-Agent: @twilio/cli-core/4.2.1 (twilio-node/3.36.0, node.js v10.16.0, darwin 18.7.0 x64, login)
[DEBUG] -- END Twilio API Request --
[DEBUG] response.statusCode: 200
[DEBUG] response.headers: {"date":"Sun, 27 Oct 2019 20:59:15 GMT","content-type":"application/json; charset=utf-8","content-length":"2243","connection":"close","last-modified":"Sat, 26 Oct 2019 19:22:08 +0000","twilio-concurrent-requests":"1","etag":"12e3852eb8df7bcfbb568b1c8a2e575a","twilio-request-id":"RQ3b87e3446ba446e8ae9acc4c37f41bd4","twilio-request-duration":"0.048","access-control-allow-origin":"*","access-control-allow-headers":"Accept, Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since","access-control-allow-methods":"GET, POST, DELETE, OPTIONS","access-control-expose-headers":"ETag","access-control-allow-credentials":"true","x-powered-by":"AT-5000","x-shenanigans":"none","x-home-region":"us1","x-api-domain":"api.twilio.com","strict-transport-security":"max-age=31536000"}
[DEBUG] -- BEGIN Twilio API Request --
[DEBUG] POST https://api.twilio.com/2010-04-01/Accounts/ACxxxxxxxxxxxxxxxxxxxaee403b545/Keys.json
[DEBUG] Form data:
[DEBUG] {"FriendlyName":"twilio-cli for christopherhranj on Chris-Hranjs-MacBook-Pro.local"}
[DEBUG] User-Agent: @twilio/cli-core/4.2.1 (twilio-node/3.36.0, node.js v10.16.0, darwin 18.7.0 x64, login)
[DEBUG] -- END Twilio API Request --
[DEBUG] response.statusCode: 400
[DEBUG] response.headers: {"date":"Sun, 27 Oct 2019 20:59:15 GMT","content-type":"application/json; charset=utf-8","content-length":"139","connection":"close","twilio-request-id":"RQ445f344df9814b3cab4dcee28333469c","twilio-request-duration":"0.033","access-control-allow-origin":"*","access-control-allow-headers":"Accept, Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since","access-control-allow-methods":"GET, POST, DELETE, OPTIONS","access-control-expose-headers":"ETag","access-control-allow-credentials":"true","x-powered-by":"AT-5000","x-shenanigans":"none","x-home-region":"us1","x-api-domain":"api.twilio.com","strict-transport-security":"max-age=31536000"}
[DEBUG] {"name":"TwilioCliError","exitCode":70001}
 » Could not create an API Key.
[DEBUG] TwilioCliError: Could not create an API Key.
    at Login.saveCredentials (/usr/local/Cellar/twilio/1.7.2/libexec/src/commands/profiles/create.js:182:13)
    at process._tickCallback (internal/process/next_tick.js:68:7)

Install should check node version

Install should check node version before proceeding and upgrade if needed

WARNING
WARNING Node version must be >=8.0.0 to use this CLI
WARNING Current node version: 6.14.3
WARNING
/usr/local/lib/node_modules/twilio-cli/node_modules/@oclif/command/lib/command.js:23
    async _run() {
          ^^^^```

"string.trim is not a function" error when sending sms from cli

Issue Summary

In twilio cli when attempting to send an sms through twilio api:core, the error string.trim is not a function prevents the sms from sending.

Steps to Reproduce

In cli;
twilio api:core:messages:create \ --to +1416XXXXX \ --from +1434XXXXX \ --body "x" \ -o json

returns:
"TypeError: string.trim is not a function at ConfigData.sanitize (/usr/local/Cellar/twilio/1.7.2/libexec/node_modules/@twilio/cli-core/src/services/config.js:143:28)"

Technical details:

  • twilio version output: twilio-cli/1.7.2 darwin-x64 node-v10.16.0
  • Command output with debug logging enabled (adding -l debug to the end of the command):
TypeError: string.trim is not a function
    at ConfigData.sanitize (/usr/local/Cellar/twilio/1.7.2/libexec/node_modules/@twilio/cli-core/src/services/config.js:143:28)
    at ConfigData.getProfileById (/usr/local/Cellar/twilio/1.7.2/libexec/node_modules/@twilio/cli-core/src/services/config.js:57:26)
    at ConfigData.setActiveProfile (/usr/local/Cellar/twilio/1.7.2/libexec/node_modules/@twilio/cli-core/src/services/config.js:69:28)
    at ConfigData.loadFromObject (/usr/local/Cellar/twilio/1.7.2/libexec/node_modules/@twilio/cli-core/src/services/config.js:138:10)
    at Config.load (/usr/local/Cellar/twilio/1.7.2/libexec/node_modules/@twilio/cli-core/src/services/config.js:160:16)

Secure credential storage failed to load.

Unable to run twilio login

Hi guys,

I'm trying to get twilio running on a web server (Digital Ocean Droplet if that matters) and am having trouble getting past the first steps.

Steps to Reproduce

  1. npm install twilio-cli -g
  2. twilio login
    Spits out the error message:
Secure credential storage failed to load.

You can also use credentials stored in environment variables:

#  OPTION 1 (recommended)
TWILIO_ACCOUNT_SID = your Account SID from twil.io/console
TWILIO_API_KEY = an API Key created at twil.io/get-api-key
TWILIO_API_SECRET = the secret for the API Key

# OPTION 2
TWILIO_ACCOUNT_SID = your Account SID from twil.io/console
TWILIO_AUTH_TOKEN = your Auth Token from twil.io/console

I tried storing the credentials within environmental variables as suggested however the same error message comes up.

When I run twilio login -l debug, the error message gets an extra line at the bottom of:
at SecureStorage.loadKeytar (/home/arj/.nvm/versions/node/v12.14.1/lib/node_modules/twilio-cli/node_modules/@twilio/cli-core/src/services/secure-storage.js:35:15)

I've not had too much experience with NVM/NPM so apologies if I'm doing something obiously incorrect.

Let me know if I'm doing anything wrong.

Parameter validation is failing on Trunk_SID's beginning in TK....

Issue Summary

Validation is failing on Trunk_SID's beginning in TK.

Steps to Reproduce

  1. Have Trunk_SID beginning in TK
  2. Try twilio-cli operations using Trunk_SID as parameter

Technical details:

user@cpu:~$ twilio version
twilio-cli/1.9.1 linux-x64 node-v12.14.0

user@cpu:~$ twilio api:trunking:v1:trunks:fetch --sid=TKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX -l debug
[DEBUG] Config File: /home/chris/.twilio-cli/config.json
[DEBUG] Using profile: ${TWILIO_API_KEY}/${TWILIO_API_SECRET}
[DEBUG] Schema for "sid": {"maxLength":34,"minLength":34,"pattern":"^TR[0-9a-fA-F]{32}$","type":"string"}
[DEBUG] Provided flags: {"sid":"TKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX","cli-log-level":"debug","properties":"sid,friendlyName,domainName","skip-parameter-validation":false,"cli-output-format":"columns"}
» Flag value validation errors:
» sid: "TKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" does not match pattern "^TR[0-9a-fA-F]{32}$"
» Cannot execute command
[DEBUG] TwilioCliError: Cannot execute command
at ApiCommandRunner.validateFlags (/home/chris/.nvm/versions/node/v12.14.0/lib/node_modules/twilio-cli/src/services/twilio-api/api-command-runner.js:56:13)
at ApiCommandRunner.run (/home/chris/.nvm/versions/node/v12.14.0/lib/node_modules/twilio-cli/src/services/twilio-api/api-command-runner.js:21:10)
at NewCommandClass.run (/home/chris/.nvm/versions/node/v12.14.0/lib/node_modules/twilio-cli/src/base-commands/twilio-api-command.js:36:35)
at async NewCommandClass._run (/home/chris/.nvm/versions/node/v12.14.0/lib/node_modules/twilio-cli/node_modules/@oclif/command/lib/command.js:44:20)
at async Config.runCommand (/home/chris/.nvm/versions/node/v12.14.0/lib/node_modules/twilio-cli/node_modules/@oclif/config/lib/config.js:151:9)
at async Main.run (/home/chris/.nvm/versions/node/v12.14.0/lib/node_modules/twilio-cli/node_modules/@oclif/command/lib/main.js:21:9)
at async Main._run (/home/chris/.nvm/versions/node/v12.14.0/lib/node_modules/twilio-cli/node_modules/@oclif/command/lib/command.js:44:20)

Issue when trying to login

Here is the output
`[lukario45@gen-mc ~]$ twilio login -l debug
[DEBUG] Config File: /home/lukario45/.twilio-cli/config.json
[DEBUG] Error loading keytar: Error: Cannot find module 'keytar'
Require stack:

  • /usr/lib/node_modules/twilio-cli/node_modules/@twilio/cli-core/src/services/require-install.js
  • /usr/lib/node_modules/twilio-cli/node_modules/@twilio/cli-core/src/base-commands/base-command.js
  • /usr/lib/node_modules/twilio-cli/node_modules/@twilio/cli-core/src/index.js
  • /usr/lib/node_modules/twilio-cli/bin/run
    [DEBUG] Found command "login" plugin: twilio-cli
    [DEBUG] Found keytar version in "@twilio/cli-core" dependencies: ^4.13.0
    ? Shorthand identifier for your profile: lukario45
    You can find your Account SID and Auth Token at https://www.twilio.com/console
    » Your Auth Token will be used once to create an API Key for future CLI access to your Twilio Project, and then forgotten.
    ? The Account SID for your Twilio Project: AC40cd61a06e07ba0df9ee7ae8946b5593
    ? Your Twilio Auth Token for your Twilio Project: [hidden]
    [DEBUG] -- BEGIN Twilio API Request --
    [DEBUG] GET https://api.twilio.com/2010-04-01/Accounts/AC40cd61a06e07ba0df9ee7ae8946b5593.json
    [DEBUG] User-Agent: @twilio/cli-core/4.4.2 (twilio-node/3.39.2, node.js v13.6.0, linux 5.4.8-arch1-1 x64, login)
    [DEBUG] -- END Twilio API Request --
    [DEBUG] response.statusCode: 200
    [DEBUG] response.headers: {"date":"Sat, 18 Jan 2020 06:03:58 GMT","content-type":"application/json; charset=utf-8","content-length":"2259","connection":"close","last-modified":"Sat, 18 Jan 2020 03:48:27 +0000","twilio-concurrent-requests":"1","etag":"ea44e9c38c1a0d6941198acdc47edadf","twilio-request-id":"RQa2e9d833c6e84450a7bb09aa819c38a2","twilio-request-duration":"0.031","access-control-allow-origin":"","access-control-allow-headers":"Accept, Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since","access-control-allow-methods":"GET, POST, DELETE, OPTIONS","access-control-expose-headers":"ETag","access-control-allow-credentials":"true","x-powered-by":"AT-5000","x-shenanigans":"none","x-home-region":"us1","x-api-domain":"api.twilio.com","strict-transport-security":"max-age=31536000"}
    [DEBUG] -- BEGIN Twilio API Request --
    [DEBUG] POST https://api.twilio.com/2010-04-01/Accounts/AC40cd61a06e07ba0df9ee7ae8946b5593/Keys.json
    [DEBUG] Form data:
    [DEBUG] {"FriendlyName":"twilio-cli for lukario45 on gen-mc"}
    [DEBUG] User-Agent: @twilio/cli-core/4.4.2 (twilio-node/3.39.2, node.js v13.6.0, linux 5.4.8-arch1-1 x64, login)
    [DEBUG] -- END Twilio API Request --
    [DEBUG] response.statusCode: 201
    [DEBUG] response.headers: {"date":"Sat, 18 Jan 2020 06:03:58 GMT","content-type":"application/json; charset=utf-8","content-length":"248","connection":"close","twilio-concurrent-requests":"1","twilio-request-id":"RQ261ffae6284240ecb9e435a20fddb866","twilio-request-duration":"0.057","access-control-allow-origin":"
    ","access-control-allow-headers":"Accept, Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since","access-control-allow-methods":"GET, POST, DELETE, OPTIONS","access-control-expose-headers":"ETag","access-control-allow-credentials":"true","x-powered-by":"AT-5000","x-shenanigans":"none","x-home-region":"us1","x-api-domain":"api.twilio.com","strict-transport-security":"max-age=31536000"}
    [DEBUG] {"sid":"SKaa8615709d93ea689c081c9a4bb30c66","friendlyName":"twilio-cli for lukario45 on gen-mc","dateCreated":"2020-01-18T06:03:58.000Z","dateUpdated":"2020-01-18T06:03:58.000Z","secret":"VgglL80id1MQ9M8py4FHTVQ67sm2gXWh"}
    libsecret-Message: 05:52:57.987: Remote error from secret service: org.freedesktop.DBus.Error.UnknownMethod: No such interface ?org.freedesktop.Secret.Collection? on object at path /org/freedesktop/secrets/collection/login
    » twilio-cli encountered an unexpected error. To report this issue, execute the command with the "-l debug" flag, then copy the output to a new issue here: https://github.com/twilio/twilio-cli/issues
    [DEBUG] No such interface “org.freedesktop.Secret.Collection” on object at path /org/freedesktop/secrets/collection/login
    [DEBUG] Error: No such interface “org.freedesktop.Secret.Collection” on object at path /org/freedesktop/secrets/collection/login`

twilio phone-numbers:update (Numbers) --voice-url https://1979cca8.ngrok.io -l debug

Code Snippet

http://prntscr.com/rujq7q

Code here

twilio phone-numbers:update +12055832916 --voice-url https://1979cca8.ngrok.io

Exception/log here

[DEBUG] Config File: C:\Users\Rohit.twilio-cli\config.json
[DEBUG] Using profile: ${TWILIO_ACCOUNT_SID}/${TWILIO_AUTH_TOKEN}
» twilio-cli encountered an unexpected error. To report this issue, execute the command with the "-l debug" flag, then copy the output to a new issue here: https://github.com/twilio/twilio-cli/issues
[DEBUG] accountSid must start with AC
[DEBUG] Error: accountSid must start with AC
at new Twilio (C:\Users\Rohit\AppData\Roaming\npm\node_modules\twilio-cli\node_modules\twilio\lib\rest\Twilio.js:135:11)
at new initializer (C:\Users\Rohit\AppData\Roaming\npm\node_modules\twilio-cli\node_modules\twilio\lib\index.js:9:10)
at NumberUpdate.buildClient (C:\Users\Rohit\AppData\Roaming\npm\node_modules\twilio-cli\node_modules@twilio\cli-core\src\base-commands\twilio-client-command.js:112:12)
at NumberUpdate.get twilioClient [as twilioClient] (C:\Users\Rohit\AppData\Roaming\npm\node_modules\twilio-cli\node_modules@twilio\cli-core\src\base-commands\twilio-client-command.js:99:26)
at NumberUpdate.run (C:\Users\Rohit\AppData\Roaming\npm\node_modules\twilio-cli\src\commands\phone-numbers\update.js:17:55)
at async NumberUpdate._run (C:\Users\Rohit\AppData\Roaming\npm\node_modules\twilio-cli\node_modules@oclif\command\lib\command.js:44:20)
at async Config.runCommand (C:\Users\Rohit\AppData\Roaming\npm\node_modules\twilio-cli\node_modules@oclif\config\lib\config.js:160:9)
at async Main.run (C:\Users\Rohit\AppData\Roaming\npm\node_modules\twilio-cli\node_modules@oclif\command\lib\main.js:21:9)
at async Main._run (C:\Users\Rohit\AppData\Roaming\npm\node_modules\twilio-cli\node_modules@oclif\command\lib\command.js:44:20)

Technical details:

  • twilio-cli version:twilio-cli/1.12.0 win32-x64 node-v12.16.1
  • node version:v12.16.1

CLI error for "twilio phone-numbers:update"

Issue Summary

Issue the command "twilio phone-numbers:update +19725971750"

Steps to Reproduce

(venv) Albertos-MBP:Quest albertokiramoto$ twilio phone-numbers:update +19725971750
» twilio-cli encountered an unexpected error. To report this issue, execute the command with the "-l debug" flag, then copy the output to a new issue here: https://github.com/twilio/twilio-cli/issues
(venv) Albertos-MBP:Quest albertokiramoto$ twilio phone-numbers:update +19725971750 -l debug
[DEBUG] Config File: /Users/albertokiramoto/.twilio-cli/config.json
[DEBUG] Using profile: ${TWILIO_ACCOUNT_SID}/${TWILIO_AUTH_TOKEN}
[DEBUG] -- BEGIN Twilio API Request --
[DEBUG] GET https://api.twilio.com/2010-04-01/Accounts/AC95a01d3c0c4515d73c9597e6a529e8c5/IncomingPhoneNumbers.json
[DEBUG] Querystring:
[DEBUG] {"PhoneNumber":"+19725971750"}
[DEBUG] User-Agent: @twilio/cli-core/3.0.2 (twilio-node/3.33.3, node.js v10.16.0, darwin 18.7.0 x64, phone-numbers:update)
[DEBUG] -- END Twilio API Request --
[DEBUG] response.statusCode: 200
[DEBUG] response.headers: {"date":"Sat, 17 Aug 2019 02:30:03 GMT","content-type":"application/json; charset=utf-8","content-length":"1857","connection":"close","twilio-concurrent-requests":"1","twilio-request-id":"RQ1533c2f1063d4d49b58aaad23effc241","twilio-request-duration":"0.131","access-control-allow-origin":"*","access-control-allow-headers":"Accept, Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since","access-control-allow-methods":"GET, POST, DELETE, OPTIONS","access-control-expose-headers":"ETag","access-control-allow-credentials":"true","x-powered-by":"AT-5000","x-shenanigans":"none","x-home-region":"us1","x-api-domain":"api.twilio.com","strict-transport-security":"max-age=31536000"}
» twilio-cli encountered an unexpected error. To report this issue, execute the command with the "-l debug" flag, then copy the output to a new issue here: https://github.com/twilio/twilio-cli/issues
[DEBUG] Cannot read property 'smsUrl' of null
[DEBUG] TypeError: Cannot read property 'smsUrl' of null
at NumberUpdate.isLocalhostUrl (/usr/local/Cellar/twilio/1.4.1/libexec/src/commands/phone-numbers/update.js:55:14)
at NumberUpdate.UrlFlags.filter.propName (/usr/local/Cellar/twilio/1.4.1/libexec/src/commands/phone-numbers/update.js:21:74)
at Array.filter ()
at NumberUpdate.runCommand (/usr/local/Cellar/twilio/1.4.1/libexec/src/commands/phone-numbers/update.js:21:50)
at process._tickCallback (internal/process/next_tick.js:68:7)
(venv) Albertos-MBP:Quest albertokiramoto$

npm run deploy:twilio-cli --- error

Issue Summary

When trying to do anything with twilio-cli - I get errno 1 error
TRYED IT IN MY OWN APP VERSION AND DEFAULT FROM GITHUB REPOSITORY

Steps to Reproduce

  1. npm i
  2. npm install -g twilio-cli
  3. twilio plugins:install @twilio-labs/plugin-rtc
  4. twilio login
  5. npm run build
  6. npm run deploy:twilio-cli / npm run deploy:twilio-cli -- --override / twilio rtc:apps:video:view / twilio rtc:apps:video:delete

Exception/Log

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] deploy:twilio-cli: `cross-env REACT_APP_SET_AUTH=passcode npm run build && twilio rtc:apps:video:deploy --authentication=passcode --app-directory ./build "--override"`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] deploy:twilio-cli script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\AA\AppData\Roaming\npm-cache\_logs\2020-04-24T09_22_10_557Z-debug.log

Windows and Linux support

Issue Summary

I get different issues on both systems.

Steps to Reproduce

Linux:
After running twilio login I get this error:

Error: Cannot autolaunch D-Bus without X11 $DISPLAY

Windows:
After running twilio autocomplete I get this error:

Autocomplete is not currently supported in Windows

Technical details:

  • twilio-cli Version: 1.4.2
  • Node.js Version: 10.15.3 (Linux) and 10.16.2 (Windows)

whitespace issue

Issue Summary

In Twilio-cli, I couldn't toggle profiles due to the white spaces. For example, one profile nama was "Sample CLI Example". Once I toggled out of that profile, I couldn't toggle back in.

Also, I had another profile "convoAPI ". I couldn't toggle to said API either due to the whitespace.

Steps to Reproduce

  1. This is the first step
  2. This is the second step
  3. Further steps, etc.

Any other information you want to share that is relevant to the issue being reported. Especially, why do you consider this to be a bug? What do you expect to happen instead?

Technical details:

  • twilio-cli Version: master (latest commit: [commit number])
  • Node.js Version: 8.12.0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.