Configure OAuth 2.1 for Teamwork Graph CLI

This experience is currently in beta.

Who can do this?
Role: Organization admin, Site admin, End users
Atlassian Cloud: Standard, Premium, Enterprise plans
Atlassian Government Cloud: Not available

OAuth 2.1 is the default authentication method for using the Teamwork Graph CLI. Use these steps to authenticate with your Atlassian account for interactive, day-to-day use.

More about how Teamwork Graph CLI auth works

Configure OAuth 2.1

To configure OAuth 2.1:

  1. In your terminal, enter the command:

twg login
  1. The CLI displays a verification URL and a short user code, before opening your browser automatically. If the browser doesn't open, copy the URL and open it manually.

  2. In your browser:

    1. Select your Atlassian organization if you have more than one.

    2. Select the site you want to authorize (for example: mycompany.atlassian.net).

    3. Review the permissions the CLI is requesting, then select Accept.

  3. Return to your terminal. When authentication is complete, you'll see a confirmation:

✔ Authentication successful! ✔ Authenticated as [your name] ✔ Credentials saved to ~/.config/twg/auth.conf

Verify your authentication

To confirm authentication is working, run:

twg doctor

This checks your credentials and confirms your auth method, token status, and connected site.

Known limitations

Right now, Bitbucket requires scoped tokens and is not supported by OAuth just yet. When you run twg login in terminal, you’ll be asked for your Bitbucket token.

Troubleshooting

You might stumble on these known problems, so here’s some easy resolutions:

Problem

Solution

Browser doesn't open automatically

Run twg login --no-browser. The CLI prints the verification URL and user code so you can open it manually.

Token expired or credentials invalid

Run twg login --force to discard your existing credentials and start a fresh login.


Share feedback or report a bug

Still need help?

The Atlassian Community is here for you.