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
AbAb 

Calling a webservice with secured channel

Hello,

How is it possible to createa certificate and add a certificate during API call
Can i add this line
​​​​​​​  req.setClientCertificateName('certiname');


thank you for sugggestion
Best Answer chosen by Ab
KrishnaAvvaKrishnaAvva
Hi Sandrine,

This should get you started. https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_callouts_client_certs_http.htm
We need to generate the certificate before adding it to the request. Please find the above link for detailed steps.

Regards,
Krishna Avva