Skip to main content
POST
Required token scopes: View all chats, View all files (both are required) The generated link provides read-only access and remains valid according to the TTL (time-to-live) specified in the request. If no TTL is specified, the link does not expire. Generating a new link does not override existing ones - multiple public URLs can coexist for the same file.

Authorizations

Authorization
string
header
required

API token generated in Texter: gear icon → Developers → API Tokens. When creating a token, assign it the scopes required by the endpoints you plan to call - each endpoint lists its required scopes.

Path Parameters

fileId
string
required

The file ID. Obtain it from the media[].fileId field within a message object (see Get Messages of a Chat)

Body

application/json
ttl
integer

Time to live in seconds - how long the link remains valid before it expires. From 10 seconds to 630,720,000 (20 years). Omit for a link that never expires

Required range: 10 <= x <= 630720000

Response

The share token and the resulting public URL

token
string

The share token

url
string

Public link that incorporates the token. Can be used to access the file until it expires