Missing response_type parameter in OAuth

tarassitailo
Kilo Contributor

Hello,

I'm trying to make the request for access token like this according documentation:

POST https://dev10486.service-now.com/oauth_auth.do HTTP/1.1

Accept: application/json, application/xml, text/json, text/x-json, text/javascript, text/xml

User-Agent: RestSharp/105.2.3.0

Content-Type: application/x-www-form-urlencoded

Host: dev10486.service-now.com

Content-Length: 238

Accept-Encoding: gzip, deflate

Connection: Keep-Alive

grant_type=password&username=admin&password=SOmePaasword&redirect_uri=SomeUrl&client_id=SomeId&client_secret=SomeSecret

Unfortunately, I've got next response:

111 OAuthProblemException{error='invalid_request', description='Missing response_type parameter value', uri='null', state='null', scope='null', redirectUri='SomeUrl', responseStatus=0, parameters={}} 0

There is nothing in the documentation about this parameter - OAuth API request parameters

Any idea how to fix this? Thanks.

BTW, the similar problem exists with OAuth authorization code grant flow as well - OAuth authorization code grant flow

Thanks

2 REPLIES 2

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

only following parameters are to be give: grant_type, client_id, client_secret, username, password

Can you try to get the access token from postman tool?

Also share screenshot

you need to send the values as key values pair in the body and type should be x-www-form-urlencoded

Mark Correct if this solves your issue and also mark Helpful if you find my response worthy based on the impact.
Thanks
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

Any update on this?
Can you mark answer as correct, helpful if you were able to achieve the requirement. This helps in removing this question from unanswered list and helps users to learn from your thread. Thanks in advance.

Regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader