# Postman pre request script get id

**URL:** <https://community.postman.com/t/postman-pre-request-script-get-id/45493>\
**Category:** Help Hub\
**Created:** [March 23, 2023, 10:30am UTC](https://community.postman.com/t/postman-pre-request-script-get-id/45493 "2023-03-23T10:30:45Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![pandaonsweets](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/pandaonsweets/32/15875_2.png) [@pandaonsweets](https://community.postman.com/u/pandaonsweets)\
**Post date:** [March 23, 2023, 10:30am UTC](https://community.postman.com/t/postman-pre-request-script-get-id/45493/1 "2023-03-23T10:30:45Z")

</div>

i have a put method, and i need to a pre request script that makes a post request to create user data, and have another get request in same script to get by id from user data and put it to variable. I dont know hot to get that id from the get method in same script
