by John Adam.
First : Enable Mobile Service and REST Protocal Service.
To retrieve the token:
http://<ServerDomain>/login/token.php?username=<USERNAME>&password=<PASSWORD>&service=moodle_mobile_app
Get content :
http://<Server Domain>/webservice/rest/server.php?wstoken=<VeryLongID>&wsfunction=core_course_get_contents&courseid=<idNumber>