I want to create an API request in Postman that creates a category in Moodle. The following are the steps which I did in Moodle :
- Enabled Web service
- Created an External service and added core_course_create_categories function.
- Enabled REST protocol
- Created Token.
This is my POST URL: http://localhost/test/moodle/webservice/rest/server.php?username=admin&password=Password@1&service=mycustomservice&name=CustomCategory&parent=1&idnumber=CSTM1&description=Desc
Under Authorization tab, I have selected Bearer Token and added the Token from Moodle web service.
When I send the request, I am getting invalidtoken Invalid token - token not found error.
Can anyone please suggest a solution for this
Moodle version: 3.4.8 and Postman version 7.6.0
Thanks in advance.