Background
At work, we just began to use (or experiment with) Todoist to keep track of log files we need to collect from sites. Todoist is a task management tool that is available on mobile, desktop and web platforms.
Motivation
I wanted to see if I can manipulate the tasks from scripts. I'm using yowsuptodevelopaWhatsappbotsoIwaswonderingifIcansomehowgetthebottointeractwiththetasks(suchascreatenewtasks,markthemascomplete,etc). At a casual look, the script needs to use OAuth 2.0 token before it can interact with the tasks. Since I do not know anything about the OAuth 2.0 token, here's what I've done to get started.
Steps
Install pytodoist
pip install pytodoist
Get Google OAuth 2.0 Token
I don't know anything about OAuth 2.0 token. I definitely need to learn more about it later, but I found Google OAuth 2.0 Playground, where you can get a working token.
Login with Your OAuth 2.0 Token
from pytodoist import todoist
user = todoist.login_with_google('your-gmail-address', 'your-access-token')
print user.full_name
print user.is_logged_in()
Recommended Posts