4

I am getting 403 "Authentication required." when i hit the GraphQL query in Postman. I am able to execute the same query in Sitecore GraphQL Playground.

In postman, i am passing the URL as https://{domain}/sitecore/api/graph/items/master?sc_apikey=key value

Also, Tried with using basic authentication with user name and password since Sitecore is using IDS for authentication.

How to make the authentication successful via postman?

1 Answer 1

4

You can authenticate by generating bearer token using postman as explain by Dan. http://www.dansolovay.com/2023/01/using-postman-to-authenticate-to-graphql.html

one more alternative is you can set requireAuthentication to false with the patch while using postman.

  1. Go to file AppConfig\Sitecore\Services.GraphQL\Sitecore.Services.GraphQL.config
  2. set <requireAuthentication>false</requireAuthentication>

More details: https://singhajit.com/how-to-integrate-graphql-with-sitecore-using-jss/

I tried an alternative approach and it works well. enter image description here Hope this helps!

1
  • 1
    Thank you @Sumit Helaiya. I was tryin with the first option to get and use bearer token by following the same post. But i was facing some issues. Your second option works fine for me. Almost i have done everything as you have. Mistake what i was doing is i have enabled both requireAuthentication and requireApiKey. Thank you.
    – Jey
    Feb 10 at 13:05

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.