Rest outbound call using authCode and Content-Type application/x-www-form-urlencoded

ServiceNow,REST

Published on

Dec 09, 2023

Written by

Pratiksha Khandelwal

Category

ServiceNow

x-www-form-urlencoded is not a standard content type for data transmission. You might be referring to application/x-www-form-urlencoded, which is a common content type used when submitting data through HTML forms on the web. It is a way of encoding key-value pairs as a string in the format of key1=value1&key2=value2. 

Steps are as follows. :  

 Create scripted rest api and create a method  

A screenshot of a computer

Description automatically generated

  Override default supported request formats as : application/x-www-form-urlencoded 

Scripted resource as follows :

A screenshot of a computer

Description automatically generated

 can retrieve the urlencoded values provided in the request as a JSON map. You can then supply these urlencoded key-value pairs as query parameters, in the request body, or both. They are combined and stored in the request parameters. Access these parameters through the request.queryParams object. 

Testing : 

A screenshot of a computer

Description automatically generatedWe are getting 200 ok.   

 

 

Latest Articles

Kaptius Hits 9 ServiceNow Validated Practice Accolades
ITSM   |   Sep 30, 2026

Kaptius Hits 9 ServiceNow Validated Practice Accolades

Kaptius adds FSM, Now Assist for CSM, Now Assist for ITSM and Manufa...

From Service Portal to Employee Slate: How ServiceNow Otto Is Rewriting the Employee Experience
now-assist   |   Sep 08, 2026

From Service Portal to Employee Slate: How ServiceNow Otto Is Rewriting the Employee Experience

ServiceNow Otto powers Employee Slate's AI-first experience, replaci...

The EU AI Act timetable after the Digital Omnibus: what actually applies, and when
AI   |   Aug 04, 2026

The EU AI Act timetable after the Digital Omnibus: what actually applies, and when

The Digital Omnibus deferred the EU AI Act’s high-risk obligations t...