Skip to content

wakkihaya/ticktick-node-api-oauth2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Overview

This is a Node.js wrapper for the TickTick API. It allows you to interact with your TickTick tasks programmatically. It follows OAuth2 flow based on their offical open API doc

Installation

npm install ticktick-node-api-oauth2
yarn add ticktick-node-api-oauth2

Usage

Here is an example of how to use the TickTick Node API:

import TickTick from "ticktick-node-api-oauth2";

const clientId = "your_client_id";
const clientSecret = "your_client_secret";

// AUTH ====
const authUrl = authTickTick({
  clientId,
  scopes: ["tasks:write"],
  redirectUri: "http://localhost:3000/auth/callback",
});

const tokens = await exchangeToken({
  code: "your_code",
  clientId,
  clientSecret,
  scopes: ["tasks:write"],
  redirectUri: "http://localhost:3000/auth/callback",
});

// PROJECT ====
const ticktick = new TickTickNode("your_access_token");
const project = await ticktick.fetchProjects();

License

This project is licensed under the MIT License.

Releases

No releases published

Packages

No packages published