Skip to content

Instantly share code, notes, and snippets.

@amiryousefi
Created January 31, 2020 19:00
Show Gist options
  • Save amiryousefi/7a108364c20f7f3b64db4207606f4350 to your computer and use it in GitHub Desktop.
Save amiryousefi/7a108364c20f7f3b64db4207606f4350 to your computer and use it in GitHub Desktop.
import requests
api_url = "https://beta.todoist.com/API/v8"
api_token = ""
requests.post(
"%s/tasks" % api_url,
data=json.dumps({
"content": task_content,
}),
headers={
"Content-Type": "application/json",
"X-Request-Id": str(uuid.uuid4()),
"Authorization": "Bearer %s" % api_token
}).json()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment