> ## Content Index
> Fetch the complete content index at: https://www.namastesalesforce.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# 01 · Request-reply with named credentials
- URL: https://www.namastesalesforce.com/training/integration-patterns/request-reply-named-credentials/
- Published: 2025-11-15T09:00:00.000Z
- Updated: 2025-11-15T09:00:00.000Z
- Description: The synchronous callout, done properly: named credentials for auth, a timeout you chose on purpose, and a mock for the test.
- Author: Swarnil Singhai
- Tags: Integration Patterns, #training, #duration-15m, #Import 2026-09-03 19:13

The synchronous callout, done properly: named credentials for auth, a timeout you chose on purpose, and a mock for the test.

## Named credentials or nothing

Endpoint URLs and secrets do not belong in Apex or custom settings. A named credential moves auth to configuration — and survives the sandbox refresh that would have leaked your token.

## Design for the timeout

Every callout needs an answer to 'what if this takes 30 seconds?' If the user is waiting on the answer, the honest fix is usually to make the integration asynchronous.

## Practice in your org

- Open your Developer Edition org and follow along step by step
- Change one thing at a time and note what happens
- When something breaks, read the error before searching for it