> ## Documentation Index
> Fetch the complete documentation index at: https://veryfront.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Read external file content

> Read external file content.

`externalFileContent(projectReference: String!, provider: ExternalFileProvider!, fileId: String!): ExternalFileContent!`

Requires project.integrations.read.

## Arguments

| Argument | Type | Required | Description |
| - | - | - | - |
| `projectReference` | [`String!`](https://veryfront.com/docs/cloud/graphql/types/string) | Yes | Project ID or slug. Requires project.integrations.read through the caller's own personal provider connection. |
| `provider` | [`ExternalFileProvider!`](https://veryfront.com/docs/cloud/graphql/types/externalfileprovider) | Yes | Storage provider accessed through the caller's own personal connection. A human caller is required; agent, run, and service-account credentials are refused. |
| `fileId` | [`String!`](https://veryfront.com/docs/cloud/graphql/types/string) | Yes | |

## Response

Returns [`ExternalFileContent!`](https://veryfront.com/docs/cloud/graphql/types/externalfilecontent). Open the type for its fields and nested types.

| Field | Type | Description |
| - | - | - |
| `file` | [`ExternalStorageFile!`](https://veryfront.com/docs/cloud/graphql/types/externalstoragefile) | |
| `content` | [`String!`](https://veryfront.com/docs/cloud/graphql/types/string) | Complete UTF-8 text or base64 content. More than 100000 encoded characters or 50 MiB returns limit\_exceeded instead of partial content; use importExternalFile for larger files. Folders return invalid\_input. |
| `contentEncoding` | [`ExternalFileContentEncoding!`](https://veryfront.com/docs/cloud/graphql/types/externalfilecontentencoding) | |

Types marked with `!` cannot be null. Lists use `[Type]` notation. The [type index](https://veryfront.com/docs/cloud/graphql/schema.md) lists all published input and response types.

## Example

```graphql title="query.graphql" theme={null}
query ExternalFileContent($projectReference: String!, $provider: ExternalFileProvider!, $fileId: String!) {
  externalFileContent(projectReference: $projectReference, provider: $provider, fileId: $fileId) {
    content
    contentEncoding
  }
}
```

```json title="variables.json" theme={null}
{
  "projectReference": "example-project",
  "provider": "drive",
  "fileId": "example-file-id"
}
```

<details>
  <summary>Try this query</summary>

  Calls use `https://api.veryfront.com/graphql`. Replace sample values with resources you can access. See [Authentication](https://veryfront.com/docs/cloud/authentication.md) for credentials and permissions.

  Bearer token or API key

  Stored in this tab's session. Clear credential

  Query

  Variables (JSON)
</details>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.