# Using access\_token instead of id\_token

**URL:** <https://community.auth0.com/t/using-access-token-instead-of-id-token/7654>\
**Category:** Get Help\
**Tags:** access\_token, spa, id\_token\
**Created:** [July 25, 2017, 2:11pm UTC](https://community.auth0.com/t/using-access-token-instead-of-id-token/7654 "2017-07-25T14:11:06Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![can.srht](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/can.srht/32/7828_2.png) [@can.srht](https://community.auth0.com/u/can.srht)\
**Post date:** [July 25, 2017, 2:11pm UTC](https://community.auth0.com/t/using-access-token-instead-of-id-token/7654/1 "2017-07-25T14:11:06Z")

</div>

Hi, I was looking at this relatively old example [GitHub - auth0-blog/redux-auth at auth0-lock · GitHub](https://github.com/auth0-blog/redux-auth/tree/auth0-lock) . Here, SPA makes a request to the our own server by using the **id\_token**.

What confuses me is that in the new docs it says `ID tokens should never be used as API tokens` like in here [Access Tokens - Auth0 Docs](https://auth0.com/docs/api-auth/tutorials/adoption/api-tokens) . It also says id\_token s are now just improvements which can help us avoid getting user’s profile info.

So, I have an API and a SPA. From my SPA, I will access my API. To do that I will create an API in Auth0 and a client for my SPA. SPA will use access\_token which has the scopes defined in the token. My API gets the access token. After I validated the token, I get user\_id, but to avoid going in to the DB to get user’s customer info and role (such as USER, CUSTOMER\_ADMIN) I don’t want to go to my DB. I know these can be populated to id\_token’s but is it possible to add these to access\_tokens? Is it the recommended approach?

Another question for me is that on a regular SPA, during the first authorization, why do users need to allow the application to access the details? My SPA app is already a trusted app and I think my users should not see/care about this. They just should signup and the grant automatically should be given to them. Basically, my web app should be able to access my API if they signup. I should not need their permission here. Am I wrong?

Thanks.

---

<div class="post-metadata">

**Author:** ![can.srht](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/can.srht/32/7828_2.png) [@can.srht](https://community.auth0.com/u/can.srht)\
**Post date:** [July 25, 2017, 2:45pm UTC](https://community.auth0.com/t/using-access-token-instead-of-id-token/7654/2 "2017-07-25T14:45:59Z")

</div>

[What is the right setup for Lock + SPA + Native + Rest API? - Auth0 Community](http://community.auth0.com/questions/1407/what-is-the-right-setup-for-lock-spa-native-rest-a) this question & answer has been very helpful. I think it would be good to provide links to the new examples in the old examples.

---

<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 29, 2017, 4:30am UTC](https://community.auth0.com/t/using-access-token-instead-of-id-token/7654/3 "2017-07-29T04:30:15Z")

</div>

See my answer to a similar question [here](http://community.auth0.com/questions/6761/get-user-data-server-side?childToView=6795#answer-6795).

As for the consent screen, you can enable the `Allow Skipping User Consent`setting in the API dashboard, which will skip the consent screen for First Party clients (all clients created in Auth0 are First Party by default).

---

<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:55am UTC](https://community.auth0.com/t/using-access-token-instead-of-id-token/7654/4 "2018-03-02T05:55:36Z")

</div>


