0

While access preview API https://my.stylelabsdemo.com/api/graphql/preview/v1 for Sitecore Content Hub 4 sandbox enviornment, getting "HTTP ERROR 401" This page isn’t working error.

enter image description here

Am I missing something?

1 Answer 1

2

We need to enable the publishing before using GraphQL endpoints.

  • Open /admin/settingmanagement
  • Search for publishingSettings
  • Enable the publishing
  • Publish Schema

enter image description here

IDE: https://my.stylelabs.io/api/graphql/preview/ide/

Make sure you are passing in "X-GQL-Token" in the headers.

enter image description here

This can be created from

  • admin/api-keys
  • On the specific content collection itself

enter image description here enter image description here enter image description here

5
  • I have already checked this but I was not able to create a new API key. On clicking on the "Create" button, nothing happens. Jul 5, 2021 at 14:08
  • The question did not mention anything about API key generation issue. There is a known issue if you are on CH4.0 its fixed in CH4.0.1. Please raise a support ticket if that's the case. Jul 13, 2021 at 20:16
  • Thanks again for the response. Yes, I am on CH4.0 and got to know that API creation is a known issue. I will raise a support ticket. Jul 14, 2021 at 13:39
  • Are you sure that this feature is available in the sandbox environment? I guess it is not. I raised a Sitecore support ticket and they responded back that sandbox environments are not under sitecore support. Jul 15, 2021 at 14:58
  • If its sandbox, upgrade it to 4.0.1 and its solved already there. Jul 15, 2021 at 15:12

Your Answer

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

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