File

Makes a bot send a file message.

A file can be sent by using a URL or a file ID.

  • Using a URL: Only HTTPS is allowed, and originalContentUrl is required.
  • Using a file ID: The file ID returned when the content is uploaded is used to send messages.

Note about using a file ID

  • Whenever a file message is sent, the recipient's shared storage will be reduced by the size of the file.
  • The following file extensions are blocked by default.
 'bat', 'cmd', 'com', 'cpl', 'exe', 'scr', 'js', 'vbs', 'wsf', 'hta' 
  • You can add or remove file extensions to block by default under Security > File Security in the LINE WORKS Admin.

Request content {#file-request}

ParameterTypeRequiredDescription
typestringYSet this parameter to "file".
originalContentUrlstringNURL of the source file (PNG format, HTTPS only).
Maximum length: 1,000 characters
Either originalContentUrl or fileId, but not both, must be specified (required).
fileIdstringNFile ID acquired when uploading content
Either originalContentUrl or fileId, but not both, must be specified (required).

Request example {#file-request-example}

Using a URL {#file-request-example-url}

{  "content": {    "type": "file",    "originalContentUrl": "https://line.worksmobile.com/en/wp-content/uploads/2020/05/user-start-guide-v2.0.pdf"  }}

Using a file ID {#file-request-example-fileid}

{  "content": {    "type": "file",    "fileId": "jp1.1628695315008671000.1628781715.0.1000001.0.0.0"  }}