I need to call a rest API service in Saleforce from an external client. This application logins in Salesforce with the SOAP standard login service and then has to call some custom services. The profile of the user has the Enforce SSL/TLS Mutual Authentication flag enabled and needs a certificate to make calls. The endpoint is something like this https://istance.my.salesforce.com:8443/services/apexrest/my_web_service.

I tried to call the webservice with curl and the result is:

curl "https://istance.my.salesforce.com:8443/services/apexrest/my_web_service" -H "Authorization: Bearer <session_id>" -H "Accept: application/json" -H "Content-Type: application/json; charset=UTF-8" -E fullcert.pem


I didn't find anything about call rest services with mutual authentication, so my question is, is it possible to call rest service with mutual authentication? And if so, how can I do that?

  • I wonder if this is the culprit salesforce.stackexchange.com/questions/258132/… Commented Mar 4, 2020 at 14:55
  • No, because I escaped the ! with \
    – DarkSkull
    Commented Mar 4, 2020 at 14:57
  • Can you disable mutual auth temporarily and try it without, just to eliminate other issues Commented Mar 4, 2020 at 17:02
  • I read better your first answer and giving set +H before the command it works. If you write that as an answer I'll accept it. Thank you very much.
    – DarkSkull
    Commented Mar 4, 2020 at 17:13

1 Answer 1


Setting +H before the command should fix it.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .