cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
870
Views
7
Helpful
3
Replies
Highlighted
Contributor

[spark] Error on getting the Refresh-token

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

Everyone's tags (2)
1 ACCEPTED SOLUTION

Accepted Solutions
Rising star

Re: [spark] Error on getting the Refresh-token

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

3 REPLIES 3
Rising star

Re: [spark] Error on getting the Refresh-token

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

Cisco Employee

Re: [spark] Error on getting the Refresh-token

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

Contributor

Re: [spark] Error on getting the Refresh-token

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)

CreatePlease to create content
Content for Community-Ad
August's Community Spotlight Awards