Getting server error in Oauth Apis

kiran kumar m1
Tera Contributor

kirankumarm1_0-1763032961522.png

I have created a Oauth profile and I am trying to hit from postman , when I kept the username , password , Clientid , clientsecret in the body I am getting the access token in request body 

But when I tried it keeping Authoization as Oauth 2.0 and provided the username , password , Clientid , clientsecret in the authorization with grant type password it is throwing me this error in the body 

kirankumarm1_1-1763033298848.png

Has anyone faced this issue ?

2 REPLIES 2

Ankur Bawiskar
Tera Patron
Tera Patron

@kiran kumar m1 

you need to include grant_type as well while getting the token and include that in your body

AnkurBawiskar_0-1763033652822.png

 

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

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

Hi @Ankur Bawiskar  thanks for the response , my issue is I dont want the  username , password , Clientid , clientsecret in the body , i want them in Authorization , while trying that i am getting the above error