---
schema_version: "1"
id: 3982092a38e3122d3cc1ac3847822a1edb6071d3a404d437c521c40bd574f425
title: OAuth 2.0 Echo Endpoint
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/xcloud/264-0-0/remoteaccess_oauth_echo_endpoint.md
canonical_url: https://help.salesforce.com/s/articleView?id=xcloud.remoteaccess_oauth_echo_endpoint.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: fea41a648fbf7d9a464187414805b52a8433f88933babfcf95d4e806c26e2977
description: 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.
products:
  - Security
  - Cross Cloud
release: "264"
---
# OAuth 2.0 Echo Endpoint

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

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: both Salesforce Classic (not available in all orgs) and Lightning Experience</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: <strong>Enterprise</strong>, <strong>Unlimited</strong>, and <strong>Developer</strong> Editions</td></tr></tbody></table>

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.

```
https://MyExperienceCloudSite.my.site.com/services/oauth2/echo?code=aPrxr*******%3D%3D&state=mystate&sfdc_community_url=https%3A%2F%2FMyExperienceCloudSite.my.site.com%&sfdc_community_id=0DBRXXXXXXXXX
```

And here’s an example response based on that input.

```
{"code":"aPrxr*******","sfdc_community_url":"https://MyExperienceCloudSite.my.site.com","sfdc_community_id":"0DBRXXXXXXXXX","state":"mystate"}
```