I have set up 2 projects on XM Cloud sandbox environment.

enter image description here

Generating GraphQL EdgeToken from PS (.\New-EdgeToken.ps1 -EnvironmentId <environmentId>) for Project's (xmcloud-edge-integration) environment(dev).

But always GraphQL API returns a response from another project's (xmcloud-edge-2401) environment(xmcloud-edge-2401-devenv).

Any idea what I am doing wrong here, please suggest.

1 Answer 1


It is a bit unclear, how you are doing the graphql query. Have you specified the Endpoint, The possible endpoints based on the URL of the cm instance are:



And you need to use the correct API key.

Or if you want to use Experience Edge:


Please keep in mind, that the edge endpoint is the same for all customers/projects, the edge identifies the endpoint by the "sc_apikey" header which contains the Edge Token.

If you are using for example nextjs, you need to specify the correct endpoint and API key for these variables (docker):

GRAPH_QL_ENDPOINT= https://xmcloud-edge-2401.sitecorecloud.io/sitecore/api/graph/edge

If this answer didn't help, please provide a bit more detail about the way your are running the query. you can always test your query using a GUI:

https://[your instance].sitecorecloud.io/sitecore/api/graph/edge/ide

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.