+ Start a Discussion
SandrineSandrine 

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 Sandrine
Krishna.AvvaKrishna.Avva
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