Team account doctl usage

Posted March 4, 2019 2.9k views


I have joined a new Team in DO and have got a read-write API key from that team account, however when I do a “doctl compute droplet list” I can’t see any of the droplets that have been created.

Doing a –trace on the doctl command show that a 200 code is returned, so not sure what is happening here, could someone please assist?



  • Hey Jerry - that does sound odd, just to be sure your saved doctl API key is the one from your team account - run doctl auth init and it should return something like: Using token[YOUR_TOKEN]

  • A. OK - it looks like the account details are mine, not the team - how do I change this?
    B. Looks like it’s using the token I generated, but not going to the team account..

    Is there some configuration needed on the team account to get this working?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
2 answers

Hey Jerry - Once you’ve confirmed that the currently configured doctl auth token found in line one of ~/.config/doctl/config.yaml is not linked to your team account, you have two options:

  1. Overwrite the default token - on OSX, open up ~/.config/doctl/config.yaml in a text editor, and replace the access-token at the top with your Team API Token. Now all of your doctl commands will be directed at your Team
  2. Add an auth-context for the team - Follow these instructions for adding a second DigitalOcean account in doctl. You’ll basically need to run doctl auth init --context my-team-name and then either switch contexts using doctl auth switch or include the team context as an argument in other doctl commands with doctl compute droplet list --context my-team-name

Hope that solves your problem!