• #19841
    Salesforce | Suraj Suraj #163
    Forcetalks

    Can I have a public APEX REST API in Salesforce?

    Can I have a public APEX REST API?

     

    #19843
    Salesforce | Saurabh Saurabh #132
    Forcetalks

    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:

    #39912
    Salesforce | Parul Parul #2
    Forcetalks

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

     

    #39913
    Salesforce | Parul Parul #2
    Forcetalks

    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 4 posts - 1 through 4 (of 4 total)

Please to reply to this topic.

CONTACT US

We're not around right now. But you can send us an email and we'll get back to you, asap.

Sending

About Us

Forcetalks is a Salesforce collaboration platform for coders & developers, geeks & nerds, consultants & business heads, admins & architects, managers & marketers and of course the business owners. A community where you can learn from, where you can contribute to. For you. For Salesforce. Read More...

Copyright 2019 Forcetalks. All Right Reserved.

Log in with your credentials

or    

Forgot your details?