Skip to content

Slack: Revokes public external sharing access for a file

Slack files.revokePublicUrl: arguments, response, policy and SDK examples.

← Files operations · Get started

Operation slack.files_revokepublicurl

Provider route: POST /files.revokePublicURL. Alter supplies the connection’s credentials and routing.

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"]["revokePublicUrl"]>[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.revokePublicUrl(input);
const result = await call.wait();
return result.bodyJson();
} finally {
await app.close();
}
}
import os
from alter_sdk import App
from 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.revoke_public_url(arguments)
result = await call.wait()
return result.body_json()
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
bodyobjectRequired within parent
body.filestringRequired within parentFile to revoke

Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.

FieldTypePresenceDescription and constraints
$objectRootSchema for successful response from files.revokePublicURL method
fileModelOptionalExpand Gets information about a file — response body — file
okbooleanRequired within parentMust equal: true

Referenced models: Gets information about a file — response body — file

Gets information about a file — response body — file
FieldTypePresenceDescription and constraints
$objectRoot
channelsarrayOptional
channels[]stringEach item
comments_countJSONOptional
comments_count (anyOf 1)integerAlternative
comments_count (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
createdJSONOptional
created (anyOf 1)integerAlternative
created (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
date_deleteJSONOptional
date_delete (anyOf 1)integerAlternative
date_delete (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
display_as_botbooleanOptional
editablebooleanOptional
editorstringOptional
external_idstringOptional
external_typestringOptional
external_urlstringOptionalFormat: uri
filetypestringOptional
groupsarrayOptional
groups[]stringEach item
has_rich_previewbooleanOptional
idstringOptional
image_exif_rotationJSONOptional
image_exif_rotation (anyOf 1)integerAlternative
image_exif_rotation (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
imsarrayOptional
ims[]stringEach item
is_externalbooleanOptional
is_publicbooleanOptional
is_starredbooleanOptional
is_tombstonedbooleanOptional
last_editorstringOptional
mimetypestringOptional
modestringOptional
namestringOptional
non_owner_editablebooleanOptional
num_starsJSONOptional
num_stars (anyOf 1)integerAlternative
num_stars (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
original_hJSONOptional
original_h (anyOf 1)integerAlternative
original_h (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
original_wJSONOptional
original_w (anyOf 1)integerAlternative
original_w (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
permalinkstringOptionalFormat: uri
permalink_publicstringOptionalFormat: uri
pinned_infoModelOptionalExpand Gets information about a file — response body — file pinned info
pinned_toarrayOptional
pinned_to[]stringEach item
pretty_typestringOptional
previewstringOptional
public_url_sharedbooleanOptional
reactionsarrayOptional
reactions[]ModelEach itemExpand Gets information about a file — response body — file reactions item
sharesobjectOptional
shares.privateJSONOptional
shares.publicJSONOptional
sizeJSONOptional
size (anyOf 1)integerAlternative
size (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
source_teamstringOptional
statestringOptional
thumb_1024stringOptionalFormat: uri
thumb_1024_hJSONOptional
thumb_1024_h (anyOf 1)integerAlternative
thumb_1024_h (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
thumb_1024_wJSONOptional
thumb_1024_w (anyOf 1)integerAlternative
thumb_1024_w (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
thumb_160stringOptionalFormat: uri
thumb_360stringOptionalFormat: uri
thumb_360_hJSONOptional
thumb_360_h (anyOf 1)integerAlternative
thumb_360_h (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
thumb_360_wJSONOptional
thumb_360_w (anyOf 1)integerAlternative
thumb_360_w (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
thumb_480stringOptionalFormat: uri
thumb_480_hJSONOptional
thumb_480_h (anyOf 1)integerAlternative
thumb_480_h (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
thumb_480_wJSONOptional
thumb_480_w (anyOf 1)integerAlternative
thumb_480_w (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
thumb_64stringOptionalFormat: uri
thumb_720stringOptionalFormat: uri
thumb_720_hJSONOptional
thumb_720_h (anyOf 1)integerAlternative
thumb_720_h (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
thumb_720_wJSONOptional
thumb_720_w (anyOf 1)integerAlternative
thumb_720_w (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
thumb_80stringOptionalFormat: uri
thumb_800stringOptionalFormat: uri
thumb_800_hJSONOptional
thumb_800_h (anyOf 1)integerAlternative
thumb_800_h (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
thumb_800_wJSONOptional
thumb_800_w (anyOf 1)integerAlternative
thumb_800_w (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
thumb_960stringOptionalFormat: uri
thumb_960_hJSONOptional
thumb_960_h (anyOf 1)integerAlternative
thumb_960_h (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
thumb_960_wJSONOptional
thumb_960_w (anyOf 1)integerAlternative
thumb_960_w (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
thumb_tinystringOptional
timestampJSONOptional
timestamp (anyOf 1)integerAlternative
timestamp (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
titlestringOptional
updatedJSONOptional
updated (anyOf 1)integerAlternative
updated (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
url_privatestringOptionalFormat: uri
url_private_downloadstringOptionalFormat: uri
userstringOptional
user_teamstringOptional
usernamestringOptional

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 — file pinned info
FieldTypePresenceDescription and constraints
$objectRoot
Gets information about a file — response body — file reactions item
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: allowed
countJSONOptional
count (anyOf 1)integerAlternative
count (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
namestringOptional
usersarrayOptional
users[]stringEach item

SDK function policy ID: slack.files_revokepublicurl. Catalog operation: files_revokePublicURL. 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:write"]

Official provider source

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand which product and documentation features are useful.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

You can change these choices at any time from Cookie settings.