Title: API Request ERROR!
Last modified: January 10, 2020

---

# API Request ERROR!

 *  Resolved [seyrandev](https://wordpress.org/support/users/seyrandev/)
 * (@seyrandev)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/api-request-error-11/)
 * Hi!
    I use API and GET request [https://mysite.com/wp-json/llms/v1/students](https://mysite.com/wp-json/llms/v1/students)
   And I got error – **You are not allowed to list students** BUT My Consumer Key
   and Consumer Secret are correct. And Permissions READ/WRITE
 * please help with this!!!

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

 *  [Thomas Patrick Levy](https://wordpress.org/support/users/thomasplevy/)
 * (@thomasplevy)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/api-request-error-11/#post-12313937)
 * [@seyrandev](https://wordpress.org/support/users/seyrandev/)
 * In order to list students through the REST API endpoint in question the user 
   who owns the API credentials must have the `view_students` capability.
 * This capability is added to the WordPress core administrator role and to the 
   LifterLMS custom roles “LMS Manager”, “Insturctor”, and “Instructor’s Assistant.”
 * In order to use this API endpoint ensure that the user owning the API Credentials
   you’re using is one of these roles or you can use a role editor plugin in order
   to add the `view_students` capability to the role of your user/choice to allow
   you to access this API endpoint.
 * Let me know if that helps,
 *  Thread Starter [seyrandev](https://wordpress.org/support/users/seyrandev/)
 * (@seyrandev)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/api-request-error-11/#post-12315263)
 * My user already has a role core administrator, but I still got this error – You
   are not allowed to list students.
 * Can you record a short video for me? Please check this API endpoint.
 * Thanks
 *  Thread Starter [seyrandev](https://wordpress.org/support/users/seyrandev/)
 * (@seyrandev)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/api-request-error-11/#post-12316922)
 * My user has **view_students** capabilit 
    But i still got error – **You are not
   allowed to list students** Why?
 *  Plugin Contributor [Rocco Aliberti](https://wordpress.org/support/users/d4z_c0nf/)
 * (@d4z_c0nf)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/api-request-error-11/#post-12318430)
 * Hi [@seyrandev](https://wordpress.org/support/users/seyrandev/)
    is your site
   using the ssl/tls protocol and are you doing your requests to “the https url”?
 *  Thread Starter [seyrandev](https://wordpress.org/support/users/seyrandev/)
 * (@seyrandev)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/api-request-error-11/#post-12318446)
 * Sure. Using SSL and https:// protocol.
    All API request works fine(Create student,
   create student enrollments, delete student enrollments), except GET students.
    -  This reply was modified 6 years, 4 months ago by [seyrandev](https://wordpress.org/support/users/seyrandev/).
 *  Thread Starter [seyrandev](https://wordpress.org/support/users/seyrandev/)
 * (@seyrandev)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/api-request-error-11/#post-12320054)
 * System Reports
    [https://monosnap.com/file/QrtPy1Eq2ivnl2uz4lVN7tECpWbYq5](https://monosnap.com/file/QrtPy1Eq2ivnl2uz4lVN7tECpWbYq5)
   [https://monosnap.com/file/Ws8vQ5qVFz8NFk8PBmCJin9RAb1fVY](https://monosnap.com/file/Ws8vQ5qVFz8NFk8PBmCJin9RAb1fVY)
 *  [Thomas Patrick Levy](https://wordpress.org/support/users/thomasplevy/)
 * (@thomasplevy)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/api-request-error-11/#post-12320696)
 * [@seyrandev](https://wordpress.org/support/users/seyrandev/),
 * I’m not seeing any issues locally with this endpoint.
 * Your system report doesn’t appear to identify any obvious plugin conflicts or
   errors.
 * Are you receiving a 403 or a 401 error? A 401, which I believe is what you’re
   encountering, is an error that indicates your credentials are not being verified
   at all while a 403 would indicate that your credentials are valid but do not 
   provide you with permission to perform the action in question.
 * It’s possible that you’re encountering an issue of server configurations where
   your server does not accept basic authorization on a GET request. Could you try
   using the header authentication method outlined at [https://developer.lifterlms.com/rest-api/#section/Authentication/Header-Authentication](https://developer.lifterlms.com/rest-api/#section/Authentication/Header-Authentication)
 * This will use the fallback authentication method and if this is the issue you’re
   encountering should allow your api credentials to be read by the server.
 *  Thread Starter [seyrandev](https://wordpress.org/support/users/seyrandev/)
 * (@seyrandev)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/api-request-error-11/#post-12320742)
 * Ok. I create API request with POSTMAN and see i got a result but this is the 
   result wrong (Email address missing) response structure different with your API
   documentation response example
    My response – [https://monosnap.com/file/aoavktS0uMTyLNyFqig8vpZ0sdNpmS](https://monosnap.com/file/aoavktS0uMTyLNyFqig8vpZ0sdNpmS)
   Your example API /students response – [https://monosnap.com/file/CVb5KqPMUzn1raPJj7Fl3VXRXXWJj1](https://monosnap.com/file/CVb5KqPMUzn1raPJj7Fl3VXRXXWJj1)
 *  [Thomas Patrick Levy](https://wordpress.org/support/users/thomasplevy/)
 * (@thomasplevy)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/api-request-error-11/#post-12320989)
 * [@seyrandev](https://wordpress.org/support/users/seyrandev/)
 * Make the request with `context=edit` to see all student information.
 * By default we only return “public” student information in the view context. This
   follows conventions set forth by the WordPress core REST API endpoints for user
   data.
 * Hope that helps,

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

The topic ‘API Request ERROR!’ is closed to new replies.

 * ![](https://ps.w.org/lifterlms/assets/icon.svg?rev=2034507)
 * [LifterLMS - WP LMS for eLearning, Online Courses, & Quizzes](https://wordpress.org/plugins/lifterlms/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/lifterlms/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/lifterlms/)
 * [Active Topics](https://wordpress.org/support/plugin/lifterlms/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/lifterlms/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/lifterlms/reviews/)

 * 9 replies
 * 3 participants
 * Last reply from: [Thomas Patrick Levy](https://wordpress.org/support/users/thomasplevy/)
 * Last activity: [6 years, 4 months ago](https://wordpress.org/support/topic/api-request-error-11/#post-12320989)
 * Status: resolved