I want to use moodle's standard rest api for adding users and assign role to this newly created users , but when i try to invoke my service from postman here is my url for rest service invocation:
http://test-exam.sda.com/webservice/rest/server.php?wstoken=42901bb69a936dfcc37fda898a3c4c08&wsfunction=core_user_create_users&moodlewsrestformat=json& users[0][username]=liamneeson&users[0][password]=li@mR0cks!&users[0][firstname]=Liam&users[0][lastname]=Neeson&users[0][email]=liamneeson@refineddata.com
the token which i have used for rest service invocation is generated for web service user , who have permission on rest service, enrolment and also user create (i have made role which have this permissions and after that assign this role to my web service user) ,i have activated service also but when i try to use this token i got this error:
{
"exception": "webservice_access_exception",
"errorcode": "accessexception",
"message": "Access control exception"
}
I have assign this role to admin user and then i have generated token for admin user but in this case i got the same error i mean webservice_access_exception, what should i change to be able to create users?