JSON URL access restriction within Drupal I am using Drupanium in Drupal which generates JSON that can be assessed through a URL. The URL in turn is parsed by the app to show data.

Now the problem is that this URL can be publicly assessed by anyone too and anyone can see all the details. The app, on the other hand, shows the same data to the restrictive users.

My question is that how can I restrict anyone who opens the URL through a browser whilst also allowing the app to assess the data through the same URL?

The URL looks like this:-

http://site.com/section/allowed-users-in-the-list.json

Many Thanks.
Simple answer is - you need to move credentials check and permission check to your Drupal. If app on a person's computer can see all the data, no matter what you do that person can see all the data just as well. So, in Drupal only allow certain role access to that path, and then only populate results with the data user should see.