I am trying to use Graphql playground using the Delivery API endpoint and I am getting an error

  "error": "Unexpected end of JSON input"

I am using Edge token as an API key.

enter image description here

Can anyone guide me?

Additionally, I have set Sitecore_GraphQL_ExposePlayground="true" in the XM cloud variable tab

  • it seems that the JSON input is incomplete or malformed. Please verify it firstly.
    – Alexander
    Aug 16, 2023 at 8:34
  • I have verified it, JSON Input is complete
    – Manoj
    Aug 16, 2023 at 10:31

3 Answers 3


Once you’ve generated your token, you need to pass your API Token in the headers for your request. If you look at the bottom of the page you will see a HTTP HEADERS button that will give you a pane used to add those to your request. You add them in the following format,


Once this has been added you will be able to query your data and see results returned.




Hope it helps!


Your url is wrong in your ide. You are trying to query the IDE and not the API. Change the URL to :


Change it here: enter image description here

  • Thanks , This resolved the issue
    – Manoj
    Aug 17, 2023 at 13:13
  • If this resolved the issue, can you please mark the answer as accepted so others can benefit too. Thanks.
    – Richard Seal
    Aug 17, 2023 at 15:10

Verify that your edge token is valid. Pay attention to the expires_in property of the response because JWTs typically expire in 24 hours. After that time, the token is invalid, and you must request a new token.

I would say to create a new token from Edge and add this to your HTTP Headers.

"sc_apikey":"TOKEN HERE"

See if this resolves the issue.

Hope it helps.

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.