Follow these steps to create a simple Python command-line app that makes requests to Teem's APIs.
To run this quickstart, you'll need:
- Python 2.6 or greater
- pip package management tool - To install OAUTH management packages.
- A Teem Developer Account (API Key and Secret)
Assuming you have your App Name, Client ID, and Client Secret, you can setup the quickstart on your local machine.
Run the following command to install the Python packages used for OAUTH:
$ pip install --upgrade requests_oauthlib
Update CLIENT_ID
and CLIENT_SECRET
with your App's ID and Secret from Step 1 in the quickstart/quickstart.py
Run your app with the following command:
$ python quickstart.py
- If you are running the app for the first time, the app will open your browser and ask to connect to your Teem Login Screen.
Log in with your user account (if needed).
-
Click the
Grant Access
button. -
Your app will continue automatically, and you may close the window/tab.
Done! Your app will print the API response.
- Authorization information is stored on the file system, so subsequent executions will not prompt for authorization.
- The authorization flow in this example is designed for a command-line application only.