# Callback returns an error of Login Required

**URL:** <https://community.auth0.com/t/callback-returns-an-error-of-login-required/39768>\
**Category:** Get Help\
**Created:** [March 22, 2020, 8:22am UTC](https://community.auth0.com/t/callback-returns-an-error-of-login-required/39768 "2020-03-22T08:22:04Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![mark.d.d.magumcia](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/mark.d.d.magumcia/32/13327_2.png) [@mark.d.d.magumcia](https://community.auth0.com/u/mark.d.d.magumcia)\
**Post date:** [March 22, 2020, 8:22am UTC](https://community.auth0.com/t/callback-returns-an-error-of-login-required/39768/1 "2020-03-22T08:22:05Z")

</div>

I have a request URL with this format

https://[myqasote].auth0.com/authorize?audience=[myaudience]&scope=API&response\_type=code&client\_id=[myclientid]&redirect\_uri=[https://www.getpostman.com/oauth2/callback&prompt=none](https://www.getpostman.com/oauth2/callback&prompt=none)

Now my response or result that i receive is  
Found. Redirecting to [https://www.getpostman.com/oauth2/callback?error=login\_required&error\_description=Login%20required](https://www.getpostman.com/oauth2/callback?error=login_required&error_description=Login%20required)

I’m not sure what is the problem. Is my Response URL incorrect?

---

<div class="post-metadata">

**Author:** ![mathiasconradt](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/mathiasconradt/32/12758_2.png) [@mathiasconradt](https://community.auth0.com/u/mathiasconradt)\
**Post date:** [March 22, 2020, 11:46am UTC](https://community.auth0.com/t/callback-returns-an-error-of-login-required/39768/2 "2020-03-22T11:46:21Z")

</div>

Can you explain what you’re trying to achieve (i.e. why using `prompt=none` for example).  
Without additional context: as the error message states, the user needs to authenticate first, so there’s probably no valid user session existing.

Did you search the forum for “Login Required”, because iirc this came up a lot before.

[http://community.auth0.com/search?q=%22login%20required%22](http://community.auth0.com/search?q=%22login%20required%22)

---

<div class="post-metadata">

**Author:** ![mark.d.d.magumcia](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/mark.d.d.magumcia/32/13327_2.png) [@mark.d.d.magumcia](https://community.auth0.com/u/mark.d.d.magumcia)\
**Post date:** [March 22, 2020, 10:04pm UTC](https://community.auth0.com/t/callback-returns-an-error-of-login-required/39768/3 "2020-03-22T22:04:54Z")

</div>

Hi Mathias,

I am doing the first step on authorization code flow. the GET on /authorize. Also, to get the code from the callback URL, i need to use prompt=none.

---

<div class="post-metadata">

**Author:** ![mathiasconradt](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/mathiasconradt/32/12758_2.png) [@mathiasconradt](https://community.auth0.com/u/mathiasconradt)\
**Post date:** [March 23, 2020, 6:37am UTC](https://community.auth0.com/t/callback-returns-an-error-of-login-required/39768/4 "2020-03-23T06:37:46Z")

</div>

Ok, so if you got the code already, the last thing to do would be to call the `/token` endpoint, (not `/authorize`).

[https://auth0.com/docs/api/authentication#authorization-code-flow45](https://auth0.com/docs/api/authentication#authorization-code-flow45)

Note that we also have Postman collections available:

Postman Collection:  
[https://app.getpostman.com/run-collection/2a9bc47495ab00cda178](https://app.getpostman.com/run-collection/2a9bc47495ab00cda178)

Docs:  
[https://auth0.com/docs/api/authentication#code-samples](https://auth0.com/docs/api/authentication#code-samples)

> **[Auth0 APIs](https://auth0.com/docs/api)**
>
> Learn about Auth0's Management and Authentication APIs.

---

<div class="post-metadata">

**Author:** ![mark.d.d.magumcia](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/mark.d.d.magumcia/32/13327_2.png) [@mark.d.d.magumcia](https://community.auth0.com/u/mark.d.d.magumcia)\
**Post date:** [March 23, 2020, 11:32am UTC](https://community.auth0.com/t/callback-returns-an-error-of-login-required/39768/5 "2020-03-23T11:32:22Z")

</div>

Hi Mathias,

No. i did not get the code because this is the result i’m getting on my GET /authorize  
it is saying

Redirecting to [https://www.getpostman.com/oauth2/callback?error=\*\*login\_required\*\*&error\_description=\*\*Login%20required](https://www.getpostman.com/oauth2/callback?error= **login_required** &error_description=**Login%20required)\*\*

I was expecting [https://www.getpostman.com/oauth2/callback?code=](https://www.getpostman.com/oauth2/callback?code=)[SOMETHING CODE]

 ![image](https://global.discourse-cdn.com/auth0/original/3X/5/8/58e0ac9f95ddae2440f2445c39ecabce161c8507.png)

---

<div class="post-metadata">

**Author:** ![mathiasconradt](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/mathiasconradt/32/12758_2.png) [@mathiasconradt](https://community.auth0.com/u/mathiasconradt)\
**Post date:** [March 23, 2020, 11:35am UTC](https://community.auth0.com/t/callback-returns-an-error-of-login-required/39768/6 "2020-03-23T11:35:02Z")

</div>

Are you keep using `prompt=none`?

If so, is there an existing user session at Auth0 from a previous call? It’s not clear to me why you’d be using `prompt=none` , in case you do so.

---

<div class="post-metadata">

**Author:** ![mark.d.d.magumcia](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/mark.d.d.magumcia/32/13327_2.png) [@mark.d.d.magumcia](https://community.auth0.com/u/mark.d.d.magumcia)\
**Post date:** [March 23, 2020, 12:17pm UTC](https://community.auth0.com/t/callback-returns-an-error-of-login-required/39768/7 "2020-03-23T12:17:19Z")

</div>

It will be easier for me to get the code if i use prompt = none. If i did not use prompt = none, the result will be like this. I cannot get the ‘code’.

 ![image](https://global.discourse-cdn.com/auth0/original/3X/0/1/01ffe16b280d3c0090915df0f41b6e83788a961b.png)

---

<div class="post-metadata">

**Author:** ![mathiasconradt](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/mathiasconradt/32/12758_2.png) [@mathiasconradt](https://community.auth0.com/u/mathiasconradt)\
**Post date:** [March 23, 2020, 1:07pm UTC](https://community.auth0.com/t/callback-returns-an-error-of-login-required/39768/8 "2020-03-23T13:07:55Z")

</div>

> I cannot get the ‘code’.

Why can’t you get the code? You just need to get Postman to open that `/login` redirect URL that you’re showing in the code (not sure if it’s possible in Postman). Wondering though, why are you using Postman in the first place (and not a browser / regular application)?

If you just need to quickly fetch an access token for testing purposes in Postman, you could as well just use the [ROPG / Resource Owner Password Grant](https://auth0.com/docs/api/authentication#resource-owner-password). Would be much easier (though note: just for testing purposes, otherwise not recommended over Authorization Code Grant).

In any case, `prompt=none` won’t work if there isn’t an active session of a user already, and if you can’t do any kind of user interaction.
