How to pass Credentials in JSON format in REST Message?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-06-2019 10:44 PM
I am trying to call Automation anywhere RPA tool from service now via Rest API. Credentials needs to be passed in JSON format. How to pass credentials in JSON format in REST Message?
- Labels:
-
Integrations

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-07-2019 10:43 AM
Hi John,
If you are trying to connect to ServiceNow, then the credentials have to be passed as a parameter.
Here is the sample cal of curl
curl "https://instance.service-now.com/api/now/table/incident" \
--request POST \
--header "Accept:application/json"\
--header "Content-Type:application/json" \
--data "{'short_description':'Unable to connect to office wifi','assignment_group':'287ebd7da9fe198100f92cc8d1d2154e','urgency':'2','impact':'2'}" \
--user 'username':'password'
If you are connecting to an external application, then you need to ask them for a sample json request.
Mark the comment as correct answer if this answers your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-07-2019 10:56 AM
Have you tried setting up an Outbound REST message using basic authentication (user/pass) and then calling that message from your script?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-11-2019 12:48 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-10-2021 01:36 PM
Were you ever able to resolve this? I have a similar requirement.