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
Michael Hedrick 2Michael Hedrick 2 

Exposing Rest Class security

Hello Everyone,
I am hoping I could get some feedback on what is the best and secure way to acomplish the following:
  • Have external webservices that need to create records in a salesforce
  • Do not need to response to external webservice

I was thinking that I would create Rest Class and exposing them to the external web services. 
But was wondering, is this secure? Do I need to create a Connected App or what additional steps do I need to do to make sure that the call is coming from the correct external service.

Thanks,
M
Best Answer chosen by Michael Hedrick 2
Raj VakatiRaj Vakati
See My comments here .. 
Have external webservices that need to create records in a salesforce

Yes .. You can create an Apex Rest service and expose it to the external system .. 

Do not need to response to external webservice

In this case you need to return resposnce and you can set as a void or boolean of Http Method


For security .. 

You can use Oauth and On top of its you can use certificates and Some HTTP header as part of the request
 


 

All Answers

Raj VakatiRaj Vakati
See My comments here .. 
Have external webservices that need to create records in a salesforce

Yes .. You can create an Apex Rest service and expose it to the external system .. 

Do not need to response to external webservice

In this case you need to return resposnce and you can set as a void or boolean of Http Method


For security .. 

You can use Oauth and On top of its you can use certificates and Some HTTP header as part of the request
 


 
This was selected as the best answer
v varaprasadv varaprasad
Hi Michael,

Please check once below link : 

https://www.youtube.com/watch?v=7PaDtgPLH90&t=101s

Hope this helps you!
If my answer helps resolve your query, please mark it as the 'Best Answer' & upvote it to benefit others.


Thanks
Varaprasad
Salesforce Freelance Consultant/Developer/Administrator
@For Salesforce Project Support: varaprasad4sfdc@gmail.com

Salesforce latest interview questions  :
https://www.youtube.com/channel/UCOcam_Hb4KjeBdYJlJWV_ZA?sub_confirmation=1



 
Michael Hedrick 2Michael Hedrick 2
Thanks for the replies guys.
Varaprasad I will take a look at that youtube video here in a bit.
Raj, I am not sure what this mean "In this case you need to return response and you can set as a void or boolean of Http Methods "
Will you show this in an example?  Do I need to repsond to the webservice to acknoledge that I received the request?

Cheers,
M