Why I am getting rest_forbidden error while making request to MemberPress end points?

426 Views Asked by At

I am working on wordpress site. I've installed Oauth2 and MemberPress plugins. I need to call MemberPress REST API endpoints to get current user info (user's subscriptions and memberships data) using access_token. But problem is that when non-admin user is logged into my website, I am unable to get his data from MemberPress REST API endpoints and getting rest_forbidden error.

{"code":"rest_forbidden","message":"Sorry, you are not allowed to do that.","data":{"status":403}}

Sample Request:

https://my-website.com/wp-json/mp/v1/me?access_token=eveuam06elabqpuexogjrjlqtpnq3xqz0fmo0gxs

If admin user is logged in then I am able to get his data.

0

There are 0 best solutions below