Webservice is not working in localhost

Webservice is not working in localhost

by Sushma R -
Number of replies: 2

Hi All,

I have enabled webservice, currently getting below error. I have verified all enable webservice checkbox has been checked., Where am i missing., 

{

"error": "Web service is not available. (It doesn't exist or might be disabled.)",
"errorcode": "servicenotavailable",
"stacktrace": null,
"debuginfo": null,
"reproductionlink": null
}


Average of ratings: -
In reply to Sushma R

Re: Webservice is not working in localhost

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Make sure you don't have an http / https mixup for a start.

There are quite a lot of steps to go through to get a web service working. Lots of opportunities for a mistake.
In reply to Howard Miller

Re: Webservice is not working in localhost

by Sushma R -
Thanks Miller for the suggestion,
Getting below error for "core_course_get_courses",
$serverurl = $domainname . '/webservice/rest/server.php'. '?wstoken=' . $token . '&wsfunction='.$functionname;
$params = '&courseids=2' & calling curl,
error: {"exception":"invalid_parameter_exception","errorcode":"invalidparameter","message":"Invalid parameter value detected"}