Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $ch = curl_init();
- curl_setopt($ch, CURLOPT_URL, 'https://test.salesforce.com/services/oauth2/token');
- curl_setopt($ch, CURLOPT_POST, 1);
- curl_setopt($ch, CURLOPT_POSTFIELDS, $params);
- curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
- curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
- curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 60);
- curl_setopt($ch, CURLOPT_TIMEOUT, 300);
- $result = curl_exec($ch);
- curl_close($ch);
- "{"error":"unknown_error","error_description":"retry your request"}"
- params = array(
- 'grant_type' => 'password',
- 'client_id' => $clientId,
- 'client_secret' => $clientSecret,
- 'username' => $username,
- 'password' => $password . $securityToken,
- );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement