# How to show less data if access token is not valid?

**URL:** <https://community.auth0.com/t/how-to-show-less-data-if-access-token-is-not-valid/9205>\
**Category:** Get Help\
**Tags:** permission, middleware, access-token\
**Created:** [January 16, 2018, 12:37am UTC](https://community.auth0.com/t/how-to-show-less-data-if-access-token-is-not-valid/9205 "2018-01-16T00:37:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![immunity20](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@immunity20](https://community.auth0.com/u/immunity20)\
**Post date:** [January 16, 2018, 12:37am UTC](https://community.auth0.com/t/how-to-show-less-data-if-access-token-is-not-valid/9205/1 "2018-01-16T00:37:47Z")

</div>

Hello I have create a Node API based on Auth0 tutorial ( I can protect a url but i would like to be visible just to show less data if access.token doesnt exist)

something like  
app.get(‘/api/privateurl’, checkJwt, function(req, res) {

if (access\_token===valid) {  
res.json({  
message: “Hello from a private endpoint! You are authenticated! YOu see more data…”  
});  
} else {  
res.json({  
message: “Hello from a private endpoint! You are not authenticated! YOu see fewer data…”  
});  
}  
});

---

<div class="post-metadata">

**Author:** ![James.Morrison](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/james.morrison/32/13507_2.png) [@James.Morrison](https://community.auth0.com/u/James.Morrison)\
**Post date:** [December 14, 2018, 5:46pm UTC](https://community.auth0.com/t/how-to-show-less-data-if-access-token-is-not-valid/9205/2 "2018-12-14T17:46:00Z")

</div>

As it has been more than a few months since this topic was opened, and there has been no reply or further information provided as to the existence of the issue, we are closing this topic. Please don’t hesitate to create a new topic if this issue is still present, we would be happy to work with you to help find a resolution.

---

<div class="post-metadata">

**Author:** ![James.Morrison](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/james.morrison/32/13507_2.png) [@James.Morrison](https://community.auth0.com/u/James.Morrison)\
**Post date:** [December 14, 2018, 5:46pm UTC](https://community.auth0.com/t/how-to-show-less-data-if-access-token-is-not-valid/9205/3 "2018-12-14T17:46:03Z")

</div>


