I'm trying to get access to salesforce report data using OAuth token. Some time ago it worked fine, I used the OAuth token as the session ID.
URL remoteFile = new URL(instanceURL + "/" + reportId + "?export=1&enc=UTF-8&xf=csv");
URLConnection fStream = remoteFile.openConnection();
fStream.setRequestProperty("Cookie", "sid=" + accessToken);
But it doesn't work, every time I try to access the URL it returns an HTML page which corresponds to the login page. Is there any way I can access report data (not meta-data) using the OAuth access_token?