How do you get an access token from the wunderlist api using oauth?
The wunderlist documentation says:
- Wunderlist redirects back to your site
If the user accepts your request, Wunderlist will redirect to yourredirect_uri
with a temporary code in acode
parameter as well as the state you provided in the previous step in astate
parameter. If the states don't match, the request has been created by a third party and the process should be aborted.
Exchange code for an access token: POST https://www.wunderlist.com/oauth/access_token
I do not understand
Exchange code for an access token
am I supposed to redirect to https://www.wunderlist.com/oauth/access_token to get an access token?
Exchanging the code
for an access_token
is done by executing an HTTP POST message to the token endpoint, in your case to https://www.wunderlist.com/oauth/access_token, with JSON data as specified in: https://developer.wunderlist.com/documentation/concepts/authorization. Using cURL it would look like:
curl -H "Content-Type: application/json" -d '{ "code":"<CODE>", "client_id": "<CLIENT_ID>", "client_secret": "<CLIENT_SECRET>"}' https://www.wunderlist.com/oauth/access_token