How to use cookies in scripts
Postman stores cookies inside a Cookie Manager and the stored cookies can be accessed when writing scripts in Postman.
The access to cookies inside scripts is exposed thanks to a cookie jar and you can use that cookie jar to work with cookies inside your scripts.
- Select a request > Cookies .
- Select the Domains Allowlist button and add a domain name. This will allow the domain’s cookies to be accessed in the scripts.
- Create a Cookie jar in your script.
- Note: You can use the cookie jar to Get, Delete, Create or Update cookies. To learn more, you will find further operations you can perform on the cookie jar in the Learning Center .
Have more questions? Submit a request