How to make a CRUD of Leads from

https://{instance} – {sandbox}

I need to get the token using client_id, client secret, username, password of salesforce.

At the wordpress, I would use the curl using those informations.

Once I get a token, I can create/update Lead.

https://{instance} – {sandbox}

It has Get, Post, Patch …

For Patch, curl_setopt( $ch, CURLOPT_CUSTOMREQUEST, ‘PATCH’);

sample code

$ch = curl_init();

curl_setopt( $ch, CURLOPT_URL, $salesforce_url);

curl_setopt( $ch, CURLOPT_POSTFIELDS, json_encode(data) );

curl_setopt( $ch, CURLOPT_HTTPHEADER,[

‘Content-type: application/json’,

‘Content-Length: ‘ . strlen(json_encode(data)),

‘Authorization: Bearer’ . $auth_token]);

curl_setopt( $ch, CURLOPT_RETURNTRANSER, true);

If you need more details, please click on here.

Leave a Reply

Your email address will not be published.