Can we use access token with soap request?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-08-2017 11:46 PM
I am able to get the access token from service now using oauth 3legged flow. How can i use it with my SOAP request to service now?
- Labels:
-
Integrations
-
Team Development
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-09-2017 10:17 PM
Hi Azam,
ServiceNow supports inbound SOAP request and is working as OAuth Provider.
When you get the access token from ServiceNow you should use it in your SOAP tool as a parameter in the SOAP request header.
This is depending on how the 3rd-party SOAP client tool is designed.
You can refer to below wiki page for the sample regarding how to use the tokens in the SOAP request.
Generating OAuth Tokens - ServiceNow Wiki http://wiki.servicenow.com/index.php?title=OAuth_Applications#gsc.tab=0
http://wiki.servicenow.com/index.php?title=OAuth_Setup#gsc.tab=0
Cheers
Henry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-13-2017 10:31 PM
Hi Henry,
Thanks for your reply
But i didnt get it how can i use the access token in SOAP request Header? Can you please make it more clear wthis .ith an example?
I would be very curios to know this.
Thanks
Azam
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-13-2017 11:16 PM
Hi Azam,
It depends which SOAP client tool you are using.
Here is a sample using Postman to get the access token and using it to access the resource. Please have a check.
Inbound OAuth Auth Code Grant Flow Part 1 - Getting Started with Postman
Cheers
Henry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-14-2017 02:37 AM
Thanks for your answer Henry.
That worked fine on Postman. But i wants to send my access token with SOAP request to service now.
It would be helpful for me if you can send some more to use access token with SOAP call.
How can use it in the request below
<soapenv:Envelope xmlns:bpel="http://xmlns.oracle.com/Error/Project1/BPELProcess2" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header>
</wsse:Security>
</soapenv:Header>
<soapenv:Body>
<bpel:process>
<!--1 or more repetitions:-->
<bpel:Object1>
<bpel:OrganizationName>testproblem</bpel:OrganizationName>
<bpel:City>?</bpel:City>
<bpel:Country>?</bpel:Country>
<bpel:PostelCode>?</bpel:PostelCode>
<bpel:State>?</bpel:State>
<bpel:element1>?</bpel:element1>
<bpel:element2>?</bpel:element2>
<bpel:element3>?</bpel:element3>
<bpel:element4>?</bpel:element4>
<bpel:element5>?</bpel:element5>
<bpel:element6>?</bpel:element6>
<bpel:element7>?</bpel:element7>
</bpel:Object1>
</bpel:process>
</soapenv:Body>
</soapenv:Envelope>
Thanks
Azam