# Logging in a separate URL and redirecting to postman

**URL:** <https://community.postman.com/t/logging-in-a-separate-url-and-redirecting-to-postman/59801>\
**Category:** Help Hub\
**Tags:** tests, collections\
**Created:** [April 10, 2024, 2:09pm UTC](https://community.postman.com/t/logging-in-a-separate-url-and-redirecting-to-postman/59801 "2024-04-10T14:09:42Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![kayal1postman](https://avatars.discourse-cdn.com/v4/letter/k/a698b9/32.png) [@kayal1postman](https://community.postman.com/u/kayal1postman)\
**Post date:** [April 10, 2024, 2:09pm UTC](https://community.postman.com/t/logging-in-a-separate-url-and-redirecting-to-postman/59801/1 "2024-04-10T14:09:42Z")

</div>

Hi,  
I’m currently automating the 6 API requests in a collection. While doing so, I encountered a problem where I am not sure how to automate that part if we run the entire collection. after hitting the 2nd request and getting the response, next step would be I will be logging into an URL where I need to provide the credentials to login and authorize something . Once I am done with that, it will automatically redirects me to the postman and I will be saving that token as an variable and utilizing in the further requests downstream. So when I am running these as an entire collection, I am stuck after the 2nd requests because now I have to login in an URL. Can you please assist here? Thanks in advance.

---

<div class="post-metadata">

**Author:** ![michaelderekjones](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/michaelderekjones/32/14819_2.png) [@michaelderekjones](https://community.postman.com/u/michaelderekjones)\
**Post date:** [April 10, 2024, 4:01pm UTC](https://community.postman.com/t/logging-in-a-separate-url-and-redirecting-to-postman/59801/2 "2024-04-10T16:01:38Z")

</div>

You can’t mimic this type of work flow using Postman as you need the browser interaction.

I don’t know your use case, so I don’t know how important it is to test the exact flow you might be using from a web application but usually you are interested in the application you hit after authentication.

So for testing purposes, I can only recommend changing the authentication type to another method that doesn’t require browser interaction. Like client credentials or password. (That’s if you are using OAuth 2.0 for authentication).

You would need to test the proper flow manually at some point.

---

<div class="post-metadata">

**Author:** ![kayal1postman](https://avatars.discourse-cdn.com/v4/letter/k/a698b9/32.png) [@kayal1postman](https://community.postman.com/u/kayal1postman)\
**Post date:** [April 12, 2024, 9:19am UTC](https://community.postman.com/t/logging-in-a-separate-url-and-redirecting-to-postman/59801/3 "2024-04-12T09:19:55Z")

</div>

Thanks for the explanation @michaelderekjones

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/system/32/29796_2.png) [@system](https://community.postman.com/u/system)\
**Post date:** [May 12, 2024, 9:20am UTC](https://community.postman.com/t/logging-in-a-separate-url-and-redirecting-to-postman/59801/4 "2024-05-12T09:20:40Z")

</div>

Closed on May 12, 2024, 9:20am UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
