💬 In plain words: An Apex callout is Salesforce making a phone call to an outside system's API. Named Credentials and External Credentials are your secure phonebook. They store the address (URL) and the login details (like OAuth tokens or an API key), so your code holds no secrets at all. Your code just says callout:My_Named_Credential , and Salesforce adds the login details for you. And a Lightning Web Component (LWC) should never make this call straight from the browser. It should ask Apex to make it. 📌 Example: A user clicks "Check Credit Score" in an LWC. The LWC calls an Apex method. Apex makes the callout to callout:CreditAPI/score through a Named Credential. The browser never sees the API URL or the secret key. If the API password changes, an admin updates it in Setup. No code change, no deployment.
Apex Development