How To Create News App Using LWC And Apex REST API?
In this blog, you will learn how you can integration news rest api to salesforce using lightning web component.
Pre-requisite Steps
1. Login to below URL and generate your API Key
https://newsapi.org/
NOTE :
- This API Key is required to fetch the details from News API.
- Paste the API Key in Apex Class NewsController Endpoint.
3. Add URL to Remote Site Settings.
a) Go to Setup
b) Search for Remote Site Settings
c) Click on "New Remote Site"
d) Paste "https://newsapi.org"
e) Save.
Source Code - GitHub Link
Demo
Follow Us