# In Passwordless is it possible to get access\_token in the query string (?) instead of the fragment (#)?

**URL:** <https://community.auth0.com/t/in-passwordless-is-it-possible-to-get-access-token-in-the-query-string-instead-of-the-fragment/7100>\
**Category:** Get Help\
**Tags:** access\_token, redirect-fragment, passwordless\
**Created:** [June 15, 2017, 10:41pm UTC](https://community.auth0.com/t/in-passwordless-is-it-possible-to-get-access-token-in-the-query-string-instead-of-the-fragment/7100 "2017-06-15T22:41:30Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![typo.institute](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@typo.institute](https://community.auth0.com/u/typo.institute)\
**Post date:** [June 15, 2017, 10:41pm UTC](https://community.auth0.com/t/in-passwordless-is-it-possible-to-get-access-token-in-the-query-string-instead-of-the-fragment/7100/1 "2017-06-15T22:41:30Z")

</div>

Hi!

When clicking on sign in link in the email sent by Passwordless I would like to get the returned data in the query string instead of the fragment.

I.e now I get

> http: //my-domain-and-path **#** access\_token=…

But would like to get

> http: //my-domain-and-path **?** access\_token=…

This way I could verify the token directly instead of needing to scrape it and send it to back-end as xhr.  
  
  
  
Thanks! 🙂

---

<div class="post-metadata">

**Author:** ![prashantT](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/prashantt/32/6002_2.png) [@prashantT](https://community.auth0.com/u/prashantT)\
**Post date:** [June 16, 2017, 6:05am UTC](https://community.auth0.com/t/in-passwordless-is-it-possible-to-get-access-token-in-the-query-string-instead-of-the-fragment/7100/2 "2017-06-16T06:05:36Z")

</div>

From: [javascript - Auth0 - Callback URL never called - Stack Overflow](https://stackoverflow.com/questions/40111082/auth0-callback-url-never-called)

> The id\_token and access\_token are  
> returned on the hash fragment when  
> you’re using a response type of token.  
> This is aimed for browser-based  
> applications that as a consequence  
> have access to the URL fragment.
> 
> If your application is a traditional  
> server-side web application you should  
> be using the code response type so  
> that an authorization code is sent to  
> your server-side as part of the query  
> string. Then on the server-side you  
> can issue a request to exchange this  
> code for the actual tokens.

---

<div class="post-metadata">

**Author:** ![typo.institute](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@typo.institute](https://community.auth0.com/u/typo.institute)\
**Post date:** [June 19, 2017, 7:09pm UTC](https://community.auth0.com/t/in-passwordless-is-it-possible-to-get-access-token-in-the-query-string-instead-of-the-fragment/7100/3 "2017-06-19T19:09:19Z")

</div>

Yup, explicitly setting “responseType” to “code” when doing `new auth0.WebAuth(...)` solved it, thank you!

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [March 2, 2018, 5:54am UTC](https://community.auth0.com/t/in-passwordless-is-it-possible-to-get-access-token-in-the-query-string-instead-of-the-fragment/7100/4 "2018-03-02T05:54:42Z")

</div>


