admin管理员组

文章数量:1122846

Hello I want to edit the post by rest api. i login succesfully with admin access but still i get

when logging in i get response

{'success': True,
 'redirectTo': '/'}

But when i need to edit i cannot

{'code': 'rest_cannot_edit',
 'message': 'Sorry, you are not allowed to edit this post.',
 'data': {'status': 401}}

the endpoint is /wp-json/ldlms/v1/sfwd-topic/291

and the plugin is LearnDash Lms

Hello I want to edit the post by rest api. i login succesfully with admin access but still i get

when logging in i get response

{'success': True,
 'redirectTo': 'https://cannedsplam.com/wp-admin/'}

But when i need to edit i cannot

{'code': 'rest_cannot_edit',
 'message': 'Sorry, you are not allowed to edit this post.',
 'data': {'status': 401}}

the endpoint is /wp-json/ldlms/v1/sfwd-topic/291

and the plugin is LearnDash Lms

Share Improve this question asked Jan 13, 2021 at 23:48 gulbaz khangulbaz khan 11 bronze badge 2
  • 1 You'll have to ask this of LearnDash's support. Third-party plugin support is off topic here. – Pat J Commented Jan 14, 2021 at 2:28
  • I also tried the same with pages endpoint the same i got. – gulbaz khan Commented Jan 14, 2021 at 2:44
Add a comment  | 

1 Answer 1

Reset to default 0

The user with which you are trying to update do not have enough permissions. Change the role to Editor and try it should work.

本文标签: post editorWordpress Rest Api restcannotedit