# I'd like to use the result of one API response, to inform another API using that data

**URL:** <https://community.postman.com/t/id-like-to-use-the-result-of-one-api-response-to-inform-another-api-using-that-data/7550>\
**Category:** Help Hub\
**Tags:** tests\
**Created:** [September 1, 2019, 11:51pm UTC](https://community.postman.com/t/id-like-to-use-the-result-of-one-api-response-to-inform-another-api-using-that-data/7550 "2019-09-01T23:51:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sshadmand](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/sshadmand/32/2708_2.png) [@sshadmand](https://community.postman.com/u/sshadmand)\
**Post date:** [September 1, 2019, 11:51pm UTC](https://community.postman.com/t/id-like-to-use-the-result-of-one-api-response-to-inform-another-api-using-that-data/7550/1 "2019-09-01T23:51:26Z")

</div>

Problem:  
I generate access tokens as part of my API. I would like to keep using those temporary tokens as part of the test cycle. Currently, since each test in discretely independant, I can’t generate that token to be used in subsequent tests.

Suggested Solution:  
I’d like for one API result to set variables for subsequent tests to be used in the request headers.

See [I'd like to use the result of one API response, to inform another API using that data · Issue #7242 · postmanlabs/postman-app-support · GitHub](https://github.com/postmanlabs/postman-app-support/issues/7242)

---

<div class="post-metadata">

**Author:** ![danny-dainton](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/danny-dainton/32/29401_2.png) [@danny-dainton](https://community.postman.com/u/danny-dainton)\
**Post date:** [September 2, 2019, 8:39pm UTC](https://community.postman.com/t/id-like-to-use-the-result-of-one-api-response-to-inform-another-api-using-that-data/7550/2 "2019-09-02T20:39:04Z")

</div>

Hey @sshadmand,

What type of token are you using? Are you able to show an example of your requests?

Have you taken a look at @allenheltondev’s post where he explains a little bit about how he is using the tokens, in his context?

> [@Medium Article: How to Automate OAuth2 Token Renewal in Postman](https://community.postman.com/t/medium-article-how-to-automate-oauth2-token-renewal-in-postman/6630):
>
> Hey everyone, I have seen on a number of forums and stack overflow articles people expressing their frustration with the manual process Postman has for renewing OAuth2 tokens when they expire. I thought I would share a write up I did to help you get past the manual process and have your tokens renewing automatically. Let me know what you think!

Maybe there is something in there that might help you out?
