cancel
Showing results for 
Search instead for 
Did you mean: 

SwaggerHub with openapi 3.0.1 and oauth2 password flow

Occasional Visitor

SwaggerHub with openapi 3.0.1 and oauth2 password flow

Hello, everyone. 

 

I'm new to this world and I have been trying to use create the open API specification using the swagger hub on a REST API that I already had programmed in JAVA. This API uses oauth2 (password flow) for authentication.

After following the documentation, I was able to set a lot of things to run correctly, but I am still having one problem regarding the call to the service once I am already Authorize to run. 

The problem is that, even though I got the token correctly, it is still undefined in the curl/Request URL so I am getting an error 401 (because the token is undefined). Please, see the images below for reference: 

 

Token ResponseToken.PNG

Curl and URL Request

Request.PNG

Header Request and Error

Header Request.PNG

I have also attached the yaml file for reference. 

I hope I was able to explain myself, any help will be appreciated. 

Thanks! 

 

Tags (2)
New Here?
Join us and watch the welcome video: