First of all, sorry for my english, thanks if you edit my question. I need to use my admin account to access for videos on my app. So i must send my token on the header, the
Use HttpURLConnection and pass OAUTH_TOKEN in the header
String oAuthToken = "your-token";
HttpURLConnection urlConnection = null;
URL vimeoURL = new URL("https://api.vimeo.com");
try {
urlConnection = (HttpURLConnection) vimeoURL.openConnection();
// set authentication
String auth = "Bearer " + oAuthToken;
urlConnection.setRequestProperty("Authorization", auth.trim());
// set request method
urlConnection.setRequestMethod("GET");
if (urlConnection.getResponseCode() == HttpURLConnection.HTTP_OK) {
// do something
}
} catch (Exception e) {// append e
// do something
} finally {
if (urlConnection != null) {// close connection
urlConnection.disconnect();
}
}