Slack: Gets information about a file
Slack files.info: arguments, response, policy and SDK examples.
← Files operations · Get started
Operation slack.files_info
Provider route: GET /files.info. Alter supplies the connection’s credentials and routing.
Call through Alter
Section titled “Call through Alter”Install @alter-ai/sdk @alter-ai/slack with npm, or alter-sdk-slack with pip. Supply your connected customer’s grant ID and the arguments described below.
import { App } from "@alter-ai/sdk";import { SlackIntegration } from "@alter-ai/slack";
async function execute(input: Parameters<SlackIntegration["files"]["info"]>[0]) { const app = new App({ apiKey: process.env.ALTER_API_KEY! }); try { const provider = new SlackIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! }); const call = await provider.files.info(input); const result = await call.wait(); return result.bodyJson(); } finally { await app.close(); }}import osfrom alter_sdk import Appfrom alter_sdk_slack import SlackIntegration
async def execute(arguments): async with App(api_key=os.environ["ALTER_API_KEY"]) as app: provider = SlackIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]}) call = await provider.files.info(arguments) result = await call.wait() return result.body_json()| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
query | object | Required within parent | Additional keys: not allowed |
query.count | integer | Optional | |
query.cursor | string | Optional | |
query.file | string | Required within parent | |
query.limit | integer | Optional | |
query.page | integer | Optional |
Response
Section titled “Response”Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Schema for successful response from files.info method |
comments | Model | Optional | Expand Gets information about a file — response body — comments |
content_html | null | Optional | |
editor | string | Optional | |
file | Model | Optional | Expand Gets information about a file — response body — file |
ok | boolean | Required within parent | Must equal: true |
paging | Model | Optional | Expand Gets information about a file — response body — paging |
response_metadata | Model | Optional | Expand Gets information about a file — response body — response metadata |
Referenced models: Gets information about a file — response body — comments, Gets information about a file — response body — file, Gets information about a file — response body — paging, Gets information about a file — response body — response metadata
Schemas
Section titled “Schemas”3 more schemas are linked from the tables above, on the schema pages.
Gets information about a file — response body — comments
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | array | Root | |
$[] | JSON | Each item |
Gets information about a file — response body — file
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
channels | array | Optional | |
channels[] | string | Each item | |
comments_count | JSON | Optional | |
comments_count (anyOf 1) | integer | Alternative | |
comments_count (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
created | JSON | Optional | |
created (anyOf 1) | integer | Alternative | |
created (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
date_delete | JSON | Optional | |
date_delete (anyOf 1) | integer | Alternative | |
date_delete (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
display_as_bot | boolean | Optional | |
editable | boolean | Optional | |
editor | string | Optional | |
external_id | string | Optional | |
external_type | string | Optional | |
external_url | string | Optional | Format: uri |
filetype | string | Optional | |
groups | array | Optional | |
groups[] | string | Each item | |
has_rich_preview | boolean | Optional | |
id | string | Optional | |
image_exif_rotation | JSON | Optional | |
image_exif_rotation (anyOf 1) | integer | Alternative | |
image_exif_rotation (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
ims | array | Optional | |
ims[] | string | Each item | |
is_external | boolean | Optional | |
is_public | boolean | Optional | |
is_starred | boolean | Optional | |
is_tombstoned | boolean | Optional | |
last_editor | string | Optional | |
mimetype | string | Optional | |
mode | string | Optional | |
name | string | Optional | |
non_owner_editable | boolean | Optional | |
num_stars | JSON | Optional | |
num_stars (anyOf 1) | integer | Alternative | |
num_stars (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
original_h | JSON | Optional | |
original_h (anyOf 1) | integer | Alternative | |
original_h (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
original_w | JSON | Optional | |
original_w (anyOf 1) | integer | Alternative | |
original_w (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
permalink | string | Optional | Format: uri |
permalink_public | string | Optional | Format: uri |
pinned_info | Model | Optional | Expand Gets information about a file — response body — file pinned info |
pinned_to | array | Optional | |
pinned_to[] | string | Each item | |
pretty_type | string | Optional | |
preview | string | Optional | |
public_url_shared | boolean | Optional | |
reactions | array | Optional | |
reactions[] | Model | Each item | Expand Gets information about a file — response body — file reactions item |
shares | object | Optional | |
shares.private | JSON | Optional | |
shares.public | JSON | Optional | |
size | JSON | Optional | |
size (anyOf 1) | integer | Alternative | |
size (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
source_team | string | Optional | |
state | string | Optional | |
thumb_1024 | string | Optional | Format: uri |
thumb_1024_h | JSON | Optional | |
thumb_1024_h (anyOf 1) | integer | Alternative | |
thumb_1024_h (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
thumb_1024_w | JSON | Optional | |
thumb_1024_w (anyOf 1) | integer | Alternative | |
thumb_1024_w (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
thumb_160 | string | Optional | Format: uri |
thumb_360 | string | Optional | Format: uri |
thumb_360_h | JSON | Optional | |
thumb_360_h (anyOf 1) | integer | Alternative | |
thumb_360_h (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
thumb_360_w | JSON | Optional | |
thumb_360_w (anyOf 1) | integer | Alternative | |
thumb_360_w (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
thumb_480 | string | Optional | Format: uri |
thumb_480_h | JSON | Optional | |
thumb_480_h (anyOf 1) | integer | Alternative | |
thumb_480_h (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
thumb_480_w | JSON | Optional | |
thumb_480_w (anyOf 1) | integer | Alternative | |
thumb_480_w (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
thumb_64 | string | Optional | Format: uri |
thumb_720 | string | Optional | Format: uri |
thumb_720_h | JSON | Optional | |
thumb_720_h (anyOf 1) | integer | Alternative | |
thumb_720_h (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
thumb_720_w | JSON | Optional | |
thumb_720_w (anyOf 1) | integer | Alternative | |
thumb_720_w (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
thumb_80 | string | Optional | Format: uri |
thumb_800 | string | Optional | Format: uri |
thumb_800_h | JSON | Optional | |
thumb_800_h (anyOf 1) | integer | Alternative | |
thumb_800_h (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
thumb_800_w | JSON | Optional | |
thumb_800_w (anyOf 1) | integer | Alternative | |
thumb_800_w (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
thumb_960 | string | Optional | Format: uri |
thumb_960_h | JSON | Optional | |
thumb_960_h (anyOf 1) | integer | Alternative | |
thumb_960_h (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
thumb_960_w | JSON | Optional | |
thumb_960_w (anyOf 1) | integer | Alternative | |
thumb_960_w (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
thumb_tiny | string | Optional | |
timestamp | JSON | Optional | |
timestamp (anyOf 1) | integer | Alternative | |
timestamp (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
title | string | Optional | |
updated | JSON | Optional | |
updated (anyOf 1) | integer | Alternative | |
updated (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
url_private | string | Optional | Format: uri |
url_private_download | string | Optional | Format: uri |
user | string | Optional | |
user_team | string | Optional | |
username | string | Optional |
Referenced models: Gets information about a file — response body — file pinned info, Gets information about a file — response body — file reactions item
Gets information about a file — response body — response metadata
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | JSON | Root | |
$ (anyOf 1) | object | Alternative | |
$ (anyOf 1).next_cursor | string | Optional | |
$ (anyOf 2) | object | Alternative | |
$ (anyOf 2).messages | array | Optional | |
$ (anyOf 2).messages[] | string | Each item | |
$ (anyOf 2).warnings | array | Optional | |
$ (anyOf 2).warnings[] | string | Each item | Known values: method_deprecated |
$ (anyOf 3) | object | Alternative | |
$ (anyOf 3).messages | array | Optional | |
$ (anyOf 3).messages[] | string | Each item | |
$ (anyOf 3).next_cursor | string | Optional | |
$ (anyOf 3).warnings | array | Optional | |
$ (anyOf 3).warnings[] | string | Each item | Known values: method_deprecated |
Policy, approvals and errors
Section titled “Policy, approvals and errors”SDK function policy ID: slack.files_info. Catalog operation: files_info. Rules can name either ID; function rules distinguish managed calls and conservatively cover raw calls sharing the route. Existing grant permissions and policy rules apply. wait() returns an immediate result or waits for a required approval; it never approves the request itself. Persist the approval ID to resume after a restart.
Provider errors retain their response; JSON decoding raises ProviderAPIError for provider failures. ManagedOperationError identifies contract/input/retention errors. See error handling and provider-specific behavior. Sensitive input may be refused before approval storage. A decoding error never resubmits a write.
Required provider scopes: ["files:read"]