We have upgraded our support system to serve you better.
For Support, please go to our Momentive Support Hub located here.

Skip to main content

XWeb:Authenticate With cURL

 
 

XWeb:Authenticate With cURL

cURL is one of the most widely used utilities to interact with web APIs. You can run it from the command line and get your Authentication token from xWeb like this:

Code

curl -H "SOAPAction: http://www.avectra.com/2005/Authenticate"
-H "Host:_Your_NF_Host_" -X POST -H "Content-Type: text/xml; charset=utf-8"
"http://_Your_NF_Host_/xweb/secure/netForumXML.asmx"
-d @_Your_Authentication_SOAP_Request_FileName_.xml

The response is routed to stdOut by default, but you can route it to a file instead with the -o option. On a Windows command line, you can also append > targetfile.txt to the above to dump the response to a filestream.

(Contents of _Your_Authentication_SOAP_Request_FileName_.xml )

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" 
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SOAP-ENV:Header>
<SOAP-ENV:SOAPAction>Authenticate</SOAP-ENV:SOAPAction>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<ns:Authenticate xmlns:ns="http://www.avectra.com/2005/">
<ns:userName>*******</ns:userName>
<ns:password>*******</ns:password>
</ns:Authenticate>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Was this article helpful?
0 out of 0 found this helpful