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.

הרשאות

Authorization
string
header
נדרש

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.

פרמטרי נתיב

fileId
string
נדרש

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

גוף

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

טווח נדרש: 10 <= x <= 630720000

תגובה

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