apisitecoresitecore8

Sitecore restful API authentication not returning token


In Sitecore, I have an item and I want to access that item through API. so I found this document: https://doc.sitecore.com/developers/82/sitecore-experience-platform/en/the-restful-api-for-the-itemservice.html

I'm trying to authenticate it through Postman using "https:///sitecore/api/ssc/auth/login" Response status is 200 OK.Response image Login Process

But nothing is coming back, no token, no error nothing. Postman response on login no token


Solution

  • You should get a Cookie back. Set ā€œContent-Type: application/jsonā€ in the request header. and use somethings like this

    {
        "domain": "sitecore",
        "username": "admin",
        "password": "b"
    }
    

    If you have a self-signed certificate turn the SSL certification verification OFF in Settings/General from the top menu in Postman.

    Tip on https://sitecore-community.github.io/docs/documentation/Sitecore%20Services%20Layer/Play%20with%20Item%20Services/ you can download Postman file with the correct setting to do a login.