Authentication: retrieve session ID for a user
You can use a session ID (SID) to authenticate your calls to the SData API and perform actions under the user account to which the SID belongs. To retrieve a session ID, submit your user name and password to Sage CRM as shown below.
Headers
Key |
Value |
---|---|
Content-Type |
application/xml |
HTTP
POST http://{{server}}/crm/eware.dll/webservices/soap
URI parameters
Name |
Description |
---|---|
{{server}} | Name or IP address of a Sage CRM server. |
Request body
<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soap:Body>
<logon xmlns="http://tempuri.org/type">
<username></username>
<password></password>
</logon>
</soap:Body>
</soap:Envelope>
Tag |
Description |
---|---|
<username></username> |
Use this tag to submit the user name of the Sage CRM account whose SID you want to retrieve. Example <username>Admin</username> |
<password></password> |
Use this tag to submit the password of the Sage CRM account whose SID you want to retrieve. |
Sample response
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Body>
<logonresponsetype xmlns="http://tempuri.org/type">
<result>
<sessionid>125407476439516</sessionid>
</result>
</logonresponsetype>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Name |
Description |
---|---|
<sessionid></sessionid> |
Contains SID of the user account. |