function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
skience2nasu1.397564234839756E12skience2nasu1.397564234839756E12 

Is it safe to use setClientCertificate method?

 

Hi all,

We are in a situation where we need to use only one client certificate from multiple instances of Salesforce in the HTTP request for the third party webservice API calls. There is a method “setClientCertificate” to set certificate but found that it is deprecated. Is it safe to use this method to make client API calls? Or is there any other approach where we can use the same certificate across different Salesforce instances?

The details of this method can be found in below help link:

http://www.salesforce.com/us/developer/docs/dbcom_apex250/index_Left.htm#CSHID=apex_classes_restful_http_httprequest.htm|StartTopic=Content%2Fapex_classes_restful_http_httprequest.htm|SkinName=webhelp

Thanks in advance!

ShashForceShashForce
You can use the "setClientCertificateName" method instead, as it says in the same page. Some info: http://www.salesforce.com/us/developer/docs/dbcom_apex250/Content/apex_callouts_client_certs_http.htm
skience2nasu1.397564234839756E12skience2nasu1.397564234839756E12

Thanks for your reply. If you use the "setClientCertificateName" method then we cannot use the same cert across the different salesforce org. For this method, we will have to generate cert within the same org, that same cert cannot be used in any other SF org. We do not have an option to upload external cert in the salesforce. Is there any other options?