Search code examples
javarestgetpostmansession-cookies

Add session cookie in Postman query


I want to submit a GET request against an api endpoint but I dont know how to add the session cookie so my request is successful and I get through the authentication. When I send my request, I get this:

{
    "timestamp": "2020-04-07T14:39:56.070+0000",
    "status": 401,
    "error": "Unauthorized",
    "message": "Unauthorized",
    "path": "/api/fridge/recommended-dishes"
}

Solution

  • You have to enable cookie interceptor in postman https://learning.postman.com/docs/postman/sending-api-requests/interceptor/