# Pre-request script

**URL:** <https://community.postman.com/t/pre-request-script/27469>\
**Category:** Help Hub\
**Created:** [September 3, 2021, 6:38pm UTC](https://community.postman.com/t/pre-request-script/27469 "2021-09-03T18:38:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rkevinburton](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/rkevinburton/32/273_2.png) [@rkevinburton](https://community.postman.com/u/rkevinburton)\
**Post date:** [September 3, 2021, 6:38pm UTC](https://community.postman.com/t/pre-request-script/27469/1 "2021-09-03T18:38:29Z")

</div>

I would like to issue a request before every API call. This is a GET request and the purpose of it is simply to return authentication cookies. Is there a good example of something like ‘pm.sendRequest. . . .’ that I could use?

---

<div class="post-metadata">

**Author:** ![bpricilla](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/bpricilla/32/6511_2.png) [@bpricilla](https://community.postman.com/u/bpricilla)\
**Post date:** [September 4, 2021, 1:15am UTC](https://community.postman.com/t/pre-request-script/27469/2 "2021-09-04T01:15:40Z")

</div>

@rkevinburton Please check [here](https://gist.github.com/madebysid/b57985b0649d3407a7aa9de1bd327990) if it’s useful. I have used this quite a few times 😊

All the best!
