invalid token with post request but works with get.

invalid token with post request but works with get.

by beWirken IT -
Number of replies: 0

Hey! Just getting started to mess around with the moodle REST API. I managed to create a web service so that I can add users programmatically. It works fine with a get request like so.

but I get an invalid token with a post requst where this is my request body in postman.

{
"wstoken": "e2ade95840a7e0fc49d9823c42016fa7",
"wsfunction": "core_user_create_users",
"moodlewsrestformat": "json",
"users": [
{
"username": "myuser",
"firstname": "Anne",
"lastname": "Peters",
"password": "MyPassword_123",
"email": "my-email@web.de"
}
]
}



Average of ratings: -