Title: API route permission
Last modified: May 2, 2018

---

# API route permission

 *  [Loïc Parent](https://wordpress.org/support/users/lowick/)
 * (@lowick)
 * [8 years ago](https://wordpress.org/support/topic/api-route-permission/)
 * _Good afternoon,_
 * I created a new custom API route for in my website.
    I access to the route and
   get data correctly but, I have access to data also when I’m not connected into
   the admin.
 * I don’t see the information in the support doc.
    Could you help me to add an 
   oAuth permission for my new route ?
 * _Thanks forwards
    Loïc.

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [Justin Greer](https://wordpress.org/support/users/justingreerbbi/)
 * (@justingreerbbi)
 * [8 years ago](https://wordpress.org/support/topic/api-route-permission/#post-10239327)
 * Hi and sorry for the issues. WP OAuth Server does not handle the authentication
   pice behind the REST API route directly.
 * You can use the permission callback parameter and then check to ensure that the
   authenticate user is an admin. You can find more about how REST API allows you
   to do this by visiting [https://developer.wordpress.org/rest-api/extending-the-rest-api/routes-and-endpoints/#permissions-callback](https://developer.wordpress.org/rest-api/extending-the-rest-api/routes-and-endpoints/#permissions-callback).
 * Hope this helps. Please let me know if you have any other questions.
 * Thanks
 *  Thread Starter [Loïc Parent](https://wordpress.org/support/users/lowick/)
 * (@lowick)
 * [8 years ago](https://wordpress.org/support/topic/api-route-permission/#post-10239444)
 * Ok thanks for your answer !
 * I will try this.
 * _Regards._

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘API route permission’ is closed to new replies.

 * ![](https://ps.w.org/oauth2-provider/assets/icon-256x256.gif?rev=2603051)
 * [WP OAuth Server (OAuth Authentication)](https://wordpress.org/plugins/oauth2-provider/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/oauth2-provider/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/oauth2-provider/)
 * [Active Topics](https://wordpress.org/support/plugin/oauth2-provider/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/oauth2-provider/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/oauth2-provider/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Loïc Parent](https://wordpress.org/support/users/lowick/)
 * Last activity: [8 years ago](https://wordpress.org/support/topic/api-route-permission/#post-10239444)
 * Status: not resolved