2

I'm using the Twilio CLI trying to deploy a flex plugin using

npm run deploy

The issue is that upon invoking this command, it asks me to select an account side

Uploading your Flex plugin to Twilio Assets

Choose one of the following Account Sids:

ACx1

ACx2

The problem is, I have NO idea where these two suggested account sids are coming from. They must be an old profile I created in the past.

How do I clear these completely, so that I dont have it assume I want to select these?

My account sid is not even listed, call it ACx3

So the CLI is somehow assuming that I am only interested in either of the 2 pre-populated Account SIDS. Whereas I have a 3rd non-listed account sid I need to deploy to.

Judy007
  • 5,484
  • 4
  • 46
  • 68

1 Answers1

4

To see which profiles are already set up, you can run twilio profiles:list. This should return the ID (shorthand identifier), Account SID, and "Active" status of each profile.

Then, you can run twilio profiles:remove "SHORTHAND IDENTIFIER" to remove the profile that you'd like to get rid of.

To add your new profile, use twilio profiles:add or just twilio login. Finally, activate your profile by running twilio profiles:use "SHORTHAND IDENTIFIER". You'll be prompted to specify a shorthand identifier when you create your new project.


Some additional Twilio CLI tips which I've found helpful and might be helpful to you as well:

  • The Twilio CLI has helper documentation for most of its commands. Just append --help to any command to view them.
  • Running twilio autocomplete zsh or twilio autocomplete bash will get you set up with autocomplete, which is helpful for exploring the functionality of the CLI.
Charlie Weems
  • 1,682
  • 1
  • 16
  • 28
  • Hi Charlie, thanks for this. The problem I am having is that when I run twilio profiles:list, it shown a single profile, call the Profile3. The account for this is ACx3. However, upon running npm run deploy, it asks me to select two OTHER accounts, ACx1, or ACx2, neither of which I am trying to work with. I need to somehow figure out how to clear ACx1 and ACx2. Again, they are NOT showing when I do twilio profiles:list, and therefore twilio profiles:remove wont help in my case – Judy007 Jan 27 '20 at 20:27
  • @joey if you run `create-flex-plugin plugin-[new plugin name] -a ACx3` does that new account SID start appearing when you run `npm run deploy`? I'm guessing you already did that when you set up your initial plugin, but just wanted to check. – Charlie Weems Jan 28 '20 at 02:25
  • 1
    @joey I dug into this a bit more and discovered that `create-flex-plugin` uses an NPM package called `keytar` to store credentials in your OS keychain. If you're using OSX, you should be able to see entries in the Keychain Access app with the name `twilio-cli` and with the account name that matches your plugin. I think for Windows you can go to Control Panel > Credentials. If I understand the plugin logic correctly, deleting these will cause a prompt to set up a new account SID. – Charlie Weems Jan 28 '20 at 17:27