Media

Get information about a URL for a client

Get information about a URL for the client. Typically this is called when a client sees a URL in a message and wants to render a preview for the user.

NOTE: Clients should consider avoiding this endpoint for URLs posted in encrypted rooms. Encrypted rooms often contain more sensitive information the users do not want to share with the homeserver, and this can mean that the URLs being shared should also not be shared with the homeserver.

get/_matrix/client/v1/media/preview_url

Request

Query parameters

urlstring uri required

The URL to get a preview of.

tsinteger

The preferred point in time to return a preview for. The server may return a newer version if it does not have the requested version available.

Response

The OpenGraph data for the URL, which may be empty. Some values are replaced with matrix equivalents if they are provided in the response. The differences from the OpenGraph protocol are described here.

matrix:image:sizeinteger

The byte-size of the image. Omitted if there is no image attached.

og:imagestring uri

An mxc:// URI to the image. Omitted if there is no image.

Changes

No recorded changes to this operation across all 1 revision of this API.