oauth 2.0 is failing when i click on Test

Priyanka_77
Tera Contributor

I have created an outbound rest message to get the token. When i click on get oauth token it says oauth flow completed successfully.
I have selected authentication as oauth 2.0 and given all the details like client id, client secret, grant type: Client credentials.


I have created POST method to get the token from the endpoint.
I am getting below error:
{"error":"invalid_request","error_description":"Missing form parameter: grant_type"}

When i give client id, client secret and grant type in the content in post method it is working fine but i have created oauth profile and content is empty but it is not working, it should ideally work.

I have also added headers like
Accept */*
Content-Type  application/x-www-form-urlencoded
User-Agent servicenow

6 REPLIES 6

@Priyanka_77 

you must have configured the OAuth registry, share screenshots of that

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