02-26-2016 02:20 AM - edited 03-17-2019 05:54 PM
Hi,
I'm trying to get a refresh token for Spark. I have an app with all the possible "scopes".
The first problem, is the OAuth Authorization URL when we have all the possible "scopes". The given URL on app page (for example https://api.ciscospark.com/v1/authorize?client_id=CLIENT_ID&response_type=code&redirect_uri=http%3A%2F%2Fwww.kurmi-software.com&scope=spark%3Amessages_write%2Cspark%3Arooms_read%2Cspark%3Amemberships_read%2Cspark%3Amessages_read%2Cspark%3Arooms_write... ) is not correct (response is "Forbidden"). If I set only one scope (for example https://api.ciscospark.com/v1/authorize?client_id=CLIENT_ID&response_type=code&redirect_uri=http%3A%2F%2Fwww.kurmi-software.com&scope=spark%3Arooms_read&state=set_state_here ) the request seems to be correct and I get a code in response but I need to have several scopes...
After that, if I try to get the refresh token with a POST request (https://api.ciscospark.com/v1/access_token, content-type:application/x-www-form-urlencoded, body : grant_type=authorization_code&client_id=CLIENT_ID&client_secret=CLIENT_SECRET&code=CODE&redirect_uri=http%3A%2F%2Fwww.kurmi-software.com) but the answer is always "{"message":"Unauthorized","errors":[{"description":"Unauthorized"}],"trackingId":"NA_bfeba8c4-2c9a-4400-8a06-c44c4860e477"}". What is wrong with this request ?
Thanks,
Fabien
Solved! Go to Solution.
02-26-2016 11:46 AM
Fabien,
I recommend you also post this to the Cisco Support Community for more feedback and information.
If you are using developer.ciscospark.com there is also an avenue regarding API support here.
https://developer.ciscospark.com/support.html
I hope this helps.
Kelli Glass
Moderator for Cisco Customer Communities
02-26-2016 11:46 AM
Fabien,
I recommend you also post this to the Cisco Support Community for more feedback and information.
If you are using developer.ciscospark.com there is also an avenue regarding API support here.
https://developer.ciscospark.com/support.html
I hope this helps.
Kelli Glass
Moderator for Cisco Customer Communities
04-14-2016 06:04 AM
I have the same question.. Did you find an answer?
04-14-2016 06:13 AM
For the first problem, the answer is to replace %2C by %20.
For the second problem, it was not necessary to encode the redirect URL.
The support team of Spark is really efficient when I had contacted them by mail (https://developer.ciscospark.com/support.html)
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide