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

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…”
});
}
});

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.