
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-29-2022 03:44 AM
Hi Experts,
I have requirement where I need to pass the POST method response to HTTP header value in GET method,
Below is the First Screenshot of POST method response, where the highlighted token which I need to pass into the GET method header value in 2nd screenshot.
Each time token value in the response will changes, so how can I fetch that value and pass it to the GET method header.
The Authentication type is : No authentication
Thanks in advance,
Chaithanya
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-29-2022 04:47 AM
@Community Alums
You may use a script include to call first API and parse the token from its Response.
then call second api by setting header as below.
var token = from First API
var r = new sn_ws.RESTMessageV2('REST Message', 'HTTP Method');
r.setRequestHeader('X-Tableu-Auth', token);
You can set header for 2nd API as below
Key: X-Tableu'-Auth
value: ${token}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-29-2022 04:47 AM
@Community Alums
You may use a script include to call first API and parse the token from its Response.
then call second api by setting header as below.
var token = from First API
var r = new sn_ws.RESTMessageV2('REST Message', 'HTTP Method');
r.setRequestHeader('X-Tableu-Auth', token);
You can set header for 2nd API as below
Key: X-Tableu'-Auth
value: ${token}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-29-2022 05:37 AM
Hi @Swapna Abburi
Thank you for the reply.
Can you please provide the script include and steps to proceed.
Thanks,

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-30-2022 05:04 AM
Hi @Swapna Abburi
The response from the POST method is in XML format, from that how can I fetch the required value?
Thanks,
Chaithanya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-30-2022 11:06 AM
@Community Alums
Please go thru the below article if it helps:
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0957116