ForumsDevelopersUsing API v3.0 with Python
Using API v3.0 with Python
Author | Message |
---|---|
User |
I'm having a problem with getting an access token using Basic Authentication in the v3.0 API. I consistently get Error code: 400 "The server couldn't fulfill the request". I've tested the code with basic authentication test sites and it seems to work there, but not with Toodledo. I'm using code based on the urllib2 documentation (see https://docs.python.org/2/howto/urllib2.html#id6) in Python 2.6.6. Is there some trick I'm missing?
Code can be found at http://xmail7.net/test.py.txt Thank you for any help you can provide. |
Jake Toodledo Founder |
Toodledo does not use basic authentication. We use OAuth, which is different. I am sure that there is a Python library for OAuth. Here is our documentation:
http://api.toodledo.com/3/account/index.php |
User |
I'm sorry. I wasn't clear in my request. I am trying to use the OAuth flow in the Toodledo documentation.
The documentation says, "GETTING AN ACCESS TOKEN: Once you have an authorization code, you can exchange it for an access token. To do this you would POST an SSL encrypted request to /3/account/token.php using basic authentication with your Client ID and secret and passing the authorization code. The response will contain an access token and refresh token." The SSL POST where I'm using basic authentication as instructed returns the 400 error code. |
Jake Toodledo Founder |
Sorry for misunderstanding. Unfortunately, I don't know enough python to help debug this. My only advice is to check out our API Playground and see if that gives you any clues as to how your code is sending the data differently.
https://api.toodledo.com/3/playground.php? |
You cannot reply yet
U Back to topic home
R Post a reply
To participate in these forums, you must be signed in.