I am working on logseq-ticktick-plugin based on logseq-todoist-plugin, and I have some problem on it.
Ticktick API is here.
https://developer.dida365.com/api#/openapi?id=version-information
It need a redirect url to get information of token, I want to know which API should I use. Maybe URL scheme or something, It remind the redirect function after logseq authorize to sync.
Is this a private page? I get a 403.
If you mean register a callback URL to invoke plugin, it’s under development: WIP: Feat/APIs http server by xyhp915 · Pull Request #7699 · logseq/logseq · GitHub
A temporal alternative should be asking user to setup the token manually.
It’s weird, this is a public page.
Token can only be access with GET-POST.
third step
After obtaining the authorization code, the user can make a POST request(Content-Type: application/x-www-form-urlencoded) to obtain the access token through the obtained authorization code. The request interface is https://dida365.com/oauth/token. The specific request parameters are as follows:
Name | Description |
---|---|
client_id | Username located in the header, Basic Auth authentication method |
client_secret | Password in Basic Auth authentication method in header |
code | The code obtained in the second step |
grant_type | grant type, now only authorization_code |
scope | comma-separated permission scope. The currently available scopes are tasks: write, tasks: read |
redirect_uri | user-configured redirect url |
Access_token for openapi request authentication in the request response ``
{
…
“access_token”: “access token value”
…
}