Good morning. I come with a doubt, it turns out that my application has to communicate with a WS to obtain the access_token and thus be able to use the methods of this. The WS uses OAuth 2.0 and the administrator passed the queries to the WS in cURL. I tried to do it from PostMan but I got a long error and from the Windows console if it works well for me. The cURL to obtain the access_token is the following:
curl -X POST -vu <client_id>:<client_secret> http://<ip ws>:8080/oauth/token -H "Accept: application/json" -d "password=<password>&username=<user>&grant_type=password&scope=read%20write&client_secret=<client_secret>&client_id=<client_id>"
This code from Windows console works perfectly, it returns the access_token. Look question is how I make this query from my Android application? Try HttpURLConnect but I have not worked. I need help! Thank you very much.