by George Dorn.
Creating a token is not enough to enable access to web services. You must also create an external service, enable a protocol (e.g. REST) and add the function (core_course_get_contents) to the service.
See http://docs.moodle.org/25/en/How_to_create_and_enable_a_web_service