Get Started with Named Credentials
For more information about named credentials, including how to create and manage named credentials in the UI, see the Named Credentials help documentation.
A named credential specifies the URL of a callout endpoint and its required authentication parameters in one definition. To simplify the setup of authenticated callouts, specify a named credential instead of a URL as the callout endpoint.
IMPORTANT In Winter ’23, Salesforce introduced an improved named credential that is extensible and customizable. We strongly recommend that you use this preferred credential instead of legacy named credentials. For information on extensible, customizable named credentials, see Named Credentials and External Credentials. Legacy named credentials are deprecated and will be discontinued in a future release.
Named credentials are supported in these types of callout definitions.
- Apex callouts
- External data sources
- External Services
Create an external credential to specify an authentication protocol and permission set or profile to use when authenticating to an external system. Add custom headers to named and external credentials to cover more use cases and security requirements.
Named credentials and external credentials simplify and enable greater reuse of setup for secure and authenticated callouts.
- A named credential specifies a callout endpoint and an HTTP transport protocol.
- An external credential’s authentication protocol and user credentials authenticate the caller. The same external credential can be used by more than one named credential.
- External credential principals map to user permissions to authorize them to make callouts.
- User external credentials store encrypted tokens.
These guides are available.
Explains how to create, edit, and delete a credential that uses OAuth authentication, and how to refresh an OAuth token.