cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1954
Views
7
Helpful
3
Replies

[spark] Error on getting the Refresh-token

fabien.bonic
Level 5
Level 5

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

1 Accepted Solution

Accepted Solutions

keglass
Level 7
Level 7

Fabien,

I recommend you also post this to the Cisco Support Community for more feedback and information.

Cisco Support Community

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

View solution in original post

3 Replies 3

keglass
Level 7
Level 7

Fabien,

I recommend you also post this to the Cisco Support Community for more feedback and information.

Cisco Support Community

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

Dirk-Jan Uittenbogaard
Cisco Employee
Cisco Employee

I have the same question.. Did you find an answer?

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)