Use the OAuth 2.0 echo endpoint to simplify development when you configure the
Authorization Code and Credentials Flow for public clients, such as single-page apps. You can
also use this endpoint for variations of the Authorization Code and Credentials Flow, including
headless registration, passwordless login, and guest user flows.
Required Editions
Available in: both Salesforce Classic (not available in all orgs) and Lightning
Experience
Available in: Enterprise, Unlimited, and Developer
Editions
The echo endpoint is available for Experience Cloud sites at
https://MyExperienceCloudSite.my.site.com/services/oauth2/echo, where
https://MyExperienceCloudSite.my.site.com is your Experience Cloud domain.
This endpoint supports Cross-Origin Resource Sharing (CORS).
During the Authorization Code and Credentials Flow, Salesforce returns a 302 redirect to a
preconfigured URL that contains the authorization code, along with other parameters. The
/services/oauth2/echo endpoint makes it easy for you to get the code by
returning these URL parameters in JSON format. In the next step of the flow, you exchange the
code for an access token. Use this endpoint for use cases where you want to complete the entire
headless login process, including the token exchange.
To use this endpoint, when you set up your external client app, configure
https://MyExperienceCloudSite.my.site.com/services/oauth2/echo as your
callback URL, which you use as the redirect_uri value when you set up the
flow.
Here’s an example URL that the endpoint accepts as an input.
We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required Cookies
Always Active
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional Cookies
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising Cookies
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.