Configure OAuth 2.1 for Teamwork Graph CLI
This experience is currently in beta.
Who can do this? |
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:
In your terminal, enter the command:
twg loginThe 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.
In your browser:
Select your Atlassian organization if you have more than one.
Select the site you want to authorize (for example:
mycompany.atlassian.net).Review the permissions the CLI is requesting, then select Accept.
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.confVerify your authentication
To confirm authentication is working, run:
twg doctorThis 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 |
Token expired or credentials invalid | Run |
Was this helpful?