[SalesForce] Using the Rest API using HTTP basic authentication without a connected app

I have been trying to find the different ways to authenticate to use the REST API and I have so far found that OAuth 2.0 is the only way to do it.
As I understand it, you need to have registered a connected app to obtain the client_id and client_secret to authenticate using OAuth.

Is there any way to authenticate and use the API without a connected app?
For example, using HTTP basic authentication? I know this is less secure than OAuth workflow; but I would like to know if this is possible.

Thanks.

Best Answer

yes its is possible without using OAuth.

Endpoint : https://www.salesforce.com/services/Soap/u/22.0

Method : POST

Body :

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:partner.soap.sforce.com">
 <soapenv:Header/>
 <soapenv:Body>
 <urn:login xmlns="urn:partner.soap.sforce.com">
 <urn:username>username</urn:username>
 <urn:password>password+Sectoken</urn:password>
 </urn:login>
 </soapenv:Body>
</soapenv:Envelope>

Headers :

Content-Type : text/xml

SOAPAction : ""

try this one using postman, you will get session Id and use this session id to call other REST Services

Related Topic