Create Named Credentials

By separating the endpoint URL and authentication from the callout definition, named credentials make callouts easier to maintain. For example, if an endpoint URL changes, you update only the named credential. All callouts that reference the named credential simply continue to work.

From Setup, in the Quick Find box, enter Named Credentials , and then select Named Credentials.

Note : Mention URL (mostly given in service provider's document eg, in above screenshot, google doc).

Identity type : Named Principal(preferred by most of the service provider)

Authentication Protocol : OAuth2.0(specified by most of the service provider)

Authentication provider : Select auth provider name

Note: refer Auth provider setup module to create auth provider.

In the Setup menu, search Auth. Provider in quick find box.

Give clientId, client secret and endpoint url (create project/app , then generate credentials).

Scope : refer service provider's document, and give relevant scope.

Once the authentication is done, status will be reflected into the named credential

While creating the channel, click named credential , and select from the drop down.

Save the channel.

Last updated