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
Yamini BathulaYamini Bathula 

consume third party apis from a force.com site

Hi,

I have a query regarding force.com sites. I am new to force.com sites. Can we consume third party APIs from force.com site? If yes, can we store the API responses back in salesforce?

Thanks,
 
SKSANJAYSKSANJAY
Hi Yamini,

Yes you can use third party API using REST API Integration. Once you receive the response from API , you can hold that response data into long text area field. Create an object and have a long text area field in there. Folow below links for REST integration.

Below link is to create your own rest API for external application
https://developer.salesforce.com/page/Creating_REST_APIs_using_Apex_REST

Below link is to access external API from Salesforce
https://trailhead.salesforce.com/en/modules/apex_integration_services/units/apex_integration_rest_callouts

While you are accesing external API through REST, You must save that external endpoint URL into "Remote Site Settings" option in setup.
Waqar Hussain SFWaqar Hussain SF
Yes, you can consume third party API from force.com platform and can get response, parse it and store data in salesforce. 

For more information please see below article
https://developer.salesforce.com/page/Apex_Web_Services_and_Callouts