---
schema_version: "1"
id: 53109e37211995eaab597f284e81fb5510eebb3d57811d7dd288ba409acf07ec
title: Get a Repository File Without Permissions Information
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/apexcode/connectapi_examples_get_repository_file_without_perms.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/connectapi_examples_get_repository_file_without_perms.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 043b0a4578037d962247dad467139ee7c8cb56612a57f9b5d7d596130ba9ee0e
description: Call a method to get a repository file without permission information.
---
# Get a Repository File Without Permissions Information

Call a method to get a repository file without permission information.

Call [getRepositoryFile(repositoryId, repositoryFileId)](https://developer.salesforce.com/docs/atlas.en-us.264.0.apexref.meta/apexref/apex_ConnectAPI_ContentHub_static_methods.htm#apex_ConnectAPI_ContentHub_getRepositoryFile_3) to get a repository file without permissions information.

final String gDriveRepositoryId = '0XCxx00000000ODGAY', gDriveFileId = 'file:0B0lTys1KmM3sTmxKNjVJbWZja00';
final ConnectApi.RepositoryFileDetail file = ConnectApi.ContentHub.getRepositoryFile(gDriveRepositoryId, gDriveFileId);
System.debug(String.format('File - name: \\'\\'{0}\\'\\', size: {1}, external URL: \\'\\'{2}\\'\\', download URL: \\'\\'{3}\\'\\'', 
   new String\[\]{ file.name, String.valueOf(file.contentSize), file.externalDocumentUrl, file.downloadUrl}));