# Passwordless sms how to getInfo off the code parameter

**URL:** <https://community.auth0.com/t/passwordless-sms-how-to-getinfo-off-the-code-parameter/7268>\
**Category:** Get Help\
**Tags:** sms, passwordless\
**Created:** [June 26, 2017, 6:49pm UTC](https://community.auth0.com/t/passwordless-sms-how-to-getinfo-off-the-code-parameter/7268 "2017-06-26T18:49:10Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![info111](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@info111](https://community.auth0.com/u/info111)\
**Post date:** [June 26, 2017, 6:49pm UTC](https://community.auth0.com/t/passwordless-sms-how-to-getinfo-off-the-code-parameter/7268/1 "2017-06-26T18:49:10Z")

</div>

How do I get the users phone number after the callback?  
i am using: auth0-lock-passwordless

```
var lock = new Auth0LockPasswordless('our_token', 'our_domain.au.auth0.com', {
  auth: {
    responseType: 'code'
  }
})
lock.sms({
  authParams: {
    scope: 'openid profile phone_number'
  },
  callbackURL: 'http://127.0.0.1:8080',
}, (err, profile, id_token, access_token, state, refresh_token) => {
  if(err) console.log(err)
  console.log(err, profile, id_token, access_token, state, refresh_token)
})

```

I need to use the parameter code to get the user’s phone\_number the lack of documention on this is bad. Using a callback I can’t get a token so what do I do with the ‘code’ parameter.

Please advice

---

<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:** [July 7, 2017, 10:17am UTC](https://community.auth0.com/t/passwordless-sms-how-to-getinfo-off-the-code-parameter/7268/2 "2017-07-07T10:17:54Z")

</div>

The responseType of `code` is intended for server-side, regular web apps. Please confirm the application you are building is a regular web app; if it is a single page application, you should be using `responseType: 'token'`.

You can follow up with any of the [Regular Web App Quickstarts](https://auth0.com/docs/quickstart/webapp) to see how to handle the authentication callback `code` on the server-side.

---

<div class="post-metadata">

**Author:** ![fredguth](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/fredguth/32/6573_2.png) [@fredguth](https://community.auth0.com/u/fredguth)\
**Post date:** [July 8, 2017, 10:18am UTC](https://community.auth0.com/t/passwordless-sms-how-to-getinfo-off-the-code-parameter/7268/3 "2017-07-08T10:18:45Z")

</div>

Besides `responseType: 'token'`, I guess he will need to add `audience: 'https://{yourAuth0domain}/userinfo`.

---

<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/passwordless-sms-how-to-getinfo-off-the-code-parameter/7268/4 "2018-03-02T05:54:58Z")

</div>


