Generate Public Media URL
Generate a public URL for a media file stored in Texter.
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.
הרשאות
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.
פרמטרי נתיב
The file ID. Obtain it from the media[].fileId field within a message object (see Get Messages of a Chat)
גוף
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