Activity Forums Salesforce® Discussions Can I have a public APEX REST API in Salesforce?

  • Suraj

    Member
    April 28, 2017 at 1:39 pm

    Can I have a public APEX REST API?

  • Saurabh

    Member
    April 28, 2017 at 1:41 pm

    Hi Suraj

    Yes you can. You will need to configure a public site and make the webservice available through it. There is an excellent tip on the developerforce blogs explaining it in more detail.

    The biggest of which is that your request must have the proper Content-Type Salesforce restful webservices reject x-www-form-urlencoded and refactoring the legacy system was a bit of a problem.

    Hope it may help you:

  • Parul

    Member
    September 29, 2018 at 1:07 am

    You will need to configure a public site and make the webservice available through it.

     

  • Parul

    Member
    September 29, 2018 at 1:08 am

    You will get a JSON response back by default. If necessary, you can force the issue via the Accept: application/json HTTP header or by appending .json to the URL.

Viewing 1 - 4 of 4 posts

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos