• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Jeanne Boyarsky
  • Tim Cooke
  • Knute Snortum
  • Junilu Lacar
  • Devaka Cooray
Saloon Keepers:
  • Ganesh Patekar
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • salvin francis
  • Ron McLeod
  • Frits Walraven
  • Pete Letkeman

Springframework HTTP: Rest Client, The grant type was not specified in the request  RSS feed

Posts: 2
Fedora Postgres Database Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Hi guys need help, I'm having problem with "grant_type", it says {"error":"invalid_request","error_description":"The grant type was not specified in the request"}.

14:37:57.849 [main] INFO com.processmaker.oauth2.details.Oauth2Config - Request access token

{Accept=[application/json], Content-Type=[application/x-www-form-urlencoded], Authorization=[Basic eC1wbS1sb2NhbC1jbGllbnQ6MTc5YWQ0NWM2Y2UyY2I5N2NmMTAyOWUyMTIwNDZlODE=]}
14:37:58.154 [main] DEBUG org.springframework.web.client.RestTemplate - Created POST request for "[color=red] d=admin[/color]"
14:37:58.156 [main] DEBUG org.springframework.web.client.RestTemplate - Setting request Accept header to [text/plain, application/xml, text/xml, application/json, application/*+xml, application/*+json, */*]
14:37:58.439 [main] DEBUG org.springframework.web.client.RestTemplate - POST request for "" resulted in 400 (Bad Request); invoking error handler
14:37:58.443 [main] ERROR com.processmaker.oauth2.details.Oauth2Config - 400
14:37:58.443 [main] ERROR com.processmaker.oauth2.details.Oauth2Config - 400 Bad Request
14:37:58.443 [main] ERROR com.processmaker.oauth2.details.Oauth2Config - {"error":"invalid_request","error_description":"The grant type was not specified in the request"}
14:37:58.443 [main] INFO com.processmaker.oauth2.details.Oauth2Config - Content-type = application/json
14:37:58.443 [main] INFO com.processmaker.oauth2.details.Oauth2Config - Authorization = null
14:37:58.443 [main] INFO com.processmaker.oauth2.details.Oauth2Config - grant_type = null

The Authorization is null and Grant_type is also null, but i already specify it in the POST request...

Best Regards
[Thumbnail for stackoverflow.PNG]
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!