REST API - 401 Unauthorized error on call to SSO enabled HP Service Manager 9.50

HI,

I have HP Service Manager 9.5 and I have enabled REST API for ticket creation on it. I was trying to create a ticket using REST without enabling SSO over http, it was creating the ticket but since I have enabled it, it is giving me a 401 unauthorized error. I also tried to create ticket over https but it says url does not exist. I have also tried by sending the client certificates in the request which is also not working.  Is there any particular configuration I am missing here?

Any help would be appreciated.