Question regarding oAuth in Space API

I try to access the Space API of my organisation and use authorisation through oAuth. I am working on an Android app, so I chose the oAuth manual here. I first get a refresh_token through this https://www.jetbrains.com/help/space/authorization-code.html#exchanging. I use a browser to get this token. It works as expected.

But when I use the refresh_token to get an access token from my organisation I get a 401 with error invalid_grant and error description Cannot resolve the refresh_token <....>. However I got this refresh_token through the organisation...? And according to the manual this should work.

Side note: when I use these steps I do get an access_token https://www.jetbrains.com/help/space/resource-owner-password-credentials.html 

The application I registered with my Organisation is one of type "Mobile or desktop app".

Is this flow allowed? Or should I use the 'Resource Owner Password credentials' flow? Does somebody know how this works?

0

Please sign in to leave a comment.