Disclaimer: Planview provides these examples for instructional purposes. While you are welcome to use this code in any way you see fit - Planview does not accept any liability or responsibility for you choosing to do so.
Demonstrates how to use OAuth2 Authorization Code flow for user authentication.
pip install -r requirements.txtEdit the script and replace these values with your application credentials:
CLIENT_ID = 'your_client_id_here'
CLIENT_SECRET = 'your_client_secret_here'
SUBDOMAIN = 'your_subdomain_here'python oauth2_authorization_code.pyThe script will:
- Open your browser for authorization
- Prompt you to enter the authorization code
- Exchange the code for access tokens
- Fetch your user profile to verify it works