As of now there is no support for fetching courses.
However, I added a improvement issue in spring socials tracker here
And I found an alternative way of fetching the courses by rest operations.
Connection<LinkedIn> connection = connectionRepository.findPrimaryConnection(LinkedIn.class);
if (connection != null) {
LinkedIn linkedin = connection.getApi();
String url = String.format("https://api.linkedin.com/v1/people/id=%s:(courses)", linkedin.profileOperations().getProfileId());
String jsonData = linkedin.restOperations().getForObject(url, String.class);
JSONObject obj = new JSONObject(jsonData).getJSONObject("courses");
JSONArray courseArray = obj.getJSONArray("values");
JSONObject course = courseArray.getJSONObject(0);
String name = course.getString("name");
System.out.println("This is the name of the first course: " + name);
}
To see what university a course belongs to seems hard. Couldn't solve that part.