Removal of token request parameters

196 views
Skip to first unread message

Omar Samuels

unread,
Dec 21, 2022, 10:21:44 PM12/21/22
to todoist-api
Hello,

ℹ️ This is an important advisory for our community of developers and integrators.

 A few years ago we deprecated the passing of a token parameter in API request calls.

While most integrations now make use of the correct implementation, which is the inclusion of an Authorization header containing the correct Bearer token, there are still a few apps and integrations that still depend on the token URL parameter.

We will be permanently shutting down support for the token parameter by December 23, 2022 and so urge you to make this small modification to your code to ensure that your integration continues to function.

-----
To give an idea of what this change might look like, a few examples are outlined below.

Deprecated:
--- Axios/JavaScript ---

--- cURL ---

--- Python ---
import requests
payload={}
headers = {}
response = requests.request("GET", url, headers=headers, data=payload)

Supported:
--- Axios/JavaScript ---
const stats = await axios.get(
    "https://api.todoist.com/sync/v9/completed/get_stats",
    { headers: { Authorization: `Bearer ${TODOIST_API_KEY}` } }
  );


--- cURL ---
--header 'Authorization: Bearer 248b...67'

--- Python ---
import requests
payload={}
headers = {
  'Authorization': 'Bearer 248b...67'
}
response = requests.request("GET", url, headers=headers, data=payload)

---
If you have any questions, please do not hesitate to reach out to us at https://todoist.com/contact and let us know.

Thank you as always for being a part of our community. 🙏

We appreciate you. 
Reply all
Reply to author
Forward
0 new messages