REST Call is being generated through Postman but not in Servicenow Workflow Script
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2024 09:29 AM
Its a integration with third party which is working through postman but not when i execute the script through workflow , its returning 401 status code.
Sytnax in REST Message Content"-
{
"requestId": "RITM Number",
"callbackUrl": "urlofcallback",
"consumerKeyword":"SIAA",
"users": [
{
"legal_first_name": "kunal",
"legal_last_name": "kumar",
"identity_type": "S",
"operational_manager": "mymanager"
}
]
}
and below is the sytax of script in workflow:-
and below is the sytax of script in workflow:-
var shared = new sn_ws.RESTMessageV2('Integration', 'MethodName');
shared.setStringParameterNoEscape('authToken', authToken);
shared.setStringParameterNoEscape('requestId', requestId);
shared.setStringParameterNoEscape('legal_first_name', first_name);
shared.setStringParameterNoEscape('legal_last_name', last_name);
shared.setStringParameterNoEscape('operational_manager', op521);
shared.setStringParameterNoEscape('identity_type', identity_type);
shared.setStringParameterNoEscape('identity_subType', identity_subtype);
shared.setStringParameterNoEscape('consumerkeyword', consumerKeyword);
Kindly help as i am getting success code through postman.
Kindly help as i am getting success code through postman.
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2024 09:31 AM
The auth token is being passed in http header of method