How to authorize on wunderlist.com and use api?
Read https://developer.wunderlist.com/documentation-tried it-does not work
I created the application and logged in with my password and mail, but apparently not where it should be. Can you please describe how the authorization and further work occurs? thank
1 answer
The documentation is all written.
First click on the link in the browser
https://www.wunderlist.com/oauth/authorize?client_id=ID&redirect_uri=URL&state=RANDOM_STRING Then the server will redirect you to the specified redirect_uri and pass the parameter code, as well as the state that you specified in the url. The parameter code must be remembered for the next step.
Next you need to make a POST request for
https://www.wunderlist.com/oauth/access_token passing the parameters there
{ client_id:ID ΠΏΡΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΡ, client_secret:Π‘Π΅ΠΊΡΠ΅ΡΠ½ΡΠΉ ΠΊΠ»ΡΡ ΠΏΡΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΡ, code: ΠΠΎΠ»ΡΡΠ΅Π½ΡΠΉ ΠΏΠ°ΡΠ°ΠΌΠ΅ΡΡ code }
If all the buzz in the response get access_token
{ "access_token": "976d16a81ccf621a654fcc23193b09498b220e89eb72ced3" }
Further in the headers to all requests, send this token and client_id
X-Access-Token: ACCESS_TOKEN X-Client-ID: CLIENT-ID
- and what should I specify in the state redirect_url? Ie, I need to create a receiver on the server at the redirect address and accept what will come there and then substitute the received token? And what does the token of the application itself, which is already known, mean? - Rakzin Roman 4:16 pm
- You have Client_SECRET - most likely this is the application token. Yes, the server needs a "receiver", which will take the received code, and send a post request, then receive client access_token and keep it. - Petr Chalov