How to delete a session

Tags: #<Tag:0x00007f8c960dbd60>

Hi, I am using Angular 7 to develop the front-end. I am facing issue in deleting the session ID. I tried following Client API guide but I am unable to delete the session id.

I tried calling “/openmrs/ws/rest/v1/session/” with delete method. Is this the correct way? or I need to pass other resources with it?

@darius @dkayiwa

Do you want to share a snippet of what you are doing here or at hastebin.com

This is to fetch session.

This is to delete the session

Does it work if you use this interface? https://demo.openmrs.org/openmrs/module/webservices/rest/test.htm

2 Likes

in postman you need to send current session token in cookie if it’s not present in Delete Request. It deletes the Session you don’t get any response but your cookie value gets changed in response and then calling other ApIs will says user not Logged in. Until you gets authenticated by calling get with authentication basic where your token gets updated in the cookie

1 Like

Thanks @vankineenitawrun It is working.