Get URL Preview

Prev Next
Get
/api/v1/chat.getURLPreview

Use this endpoint to get a URL preview that can be used in the send and update message endpoints.

Header parameters
X-Auth-Token
stringRequired

The authToken of the authenticated user.

ExampleRScctEHSmLGZGywfIhWyRpyofhKOiMoUIpimhvheU3f
X-User-Id
stringRequired

The userId of the authenticated user.

ExamplerbAXPnMktTFbNpwtJ
Query parameters
roomId
stringRequired

Enter the room ID where you want to send or update the message.

ExampleXnb2kLD2Pnhdwe3RH
url
stringRequired

Enter the URL that you want to preview.

Examplehttp://www.w3schools.com/tags/movie.mp4
Responses
200

OK

Example 1
{
  "urlPreview": {
    "url": "http://www.w3schools.com/tags/movie.mp4",
    "meta": {},
    "headers": {
      "contentLength": "318465",
      "contentType": "video/mp4"
    },
    "ignoreParse": true
  },
  "success": true
}
Expand All
object
urlPreview
object
url
string
meta
object
headers
object
contentLength
string
contentType
string
ignoreParse
boolean
success
boolean
400

Bad Request

Example 1
{
  "success": false,
  "error": "must have required property 'url' [invalid-params]",
  "errorType": "invalid-params"
}
Example 2
{
  "success": false,
  "error": "must have required property 'roomId' [invalid-params]",
  "errorType": "invalid-params"
}
object
success
boolean
error
string
errorType
string
401

Unauthorized

Authorization Error
{
  "status": "error",
  "message": "You must be logged in to do this."
}
object
status
string
message
string