Pass cookie in API

Hi,
The API’s on which i am working require cookie for authentication, so i have to pass SAAS_COMMON_BASE_TOKEN_ID and it’s value in Cookie in Postman, but where to pass the same in Katalon studio?
I Tried passing in Header but i am getting 401 Unauthorized, but the same is working fine in Postman.

Hi there,

can you share how do you pass it into Cookie header?

This topic looks similar, it may be helpful.

Hi,
i have tried the above method, its not working. I just want to know that as we have cookies button in postman for passing cookies, do we have any field in Katalon where we can pass cookies?
i am passing cookies in header in this format
SAAS_COMMON_BASE_TOKEN_ID 86c7e4e9-f478-427f-a150-072db89e4d17
Please help, i am not able to upload attachment due to company policy

Your cookie needs to be in the right format. You can pass it in HTTP Header, but format must be correct. In HTTP Header name must be “Cookie” , and value must be in the following format: cookie_name=cookie_value; path=/; domain=your_domain_ip
For example:
value:
.AspNet.ApplicationCookie=OyIXYT9caBXx4aJ92ywyb1DG6rAoj6; path=/; domain=10.10.10.5

Hope this can help

@Dusan Petrovic. Thanks for the help

Adnan Hanif said:

Hi,
i have tried the above method, its not working. I just want to know that as we have cookies button in postman for passing cookies, do we have any field in Katalon where we can pass cookies?
i am passing cookies in header in this format
SAAS_COMMON_BASE_TOKEN_ID 86c7e4e9-f478-427f-a150-072db89e4d17
Please help, i am not able to upload attachment due to company policy

Well, due to not having the complete cookie (I understand the privacy issues), I assume your case should look something like this:

SAAS_COMMON_BASE_TOKEN_ID=86c7e4e9-f478-427f-a150-072db89e4d17; path=/; domain=your_domain

Now, replace the cookie value with the whole value, if 86c7e4e9-f478-427f-a150-072db89e4d17 is not complete. Then replace “your_domain” with the address of the domain you are trying to log in.

So basically your request should look like this one in the picture below:

image.png