Skip to main content

upload_group_file

Upload a file to a group’s file system.

Request

string
required
Group number
string
required
File path, URL, or Base64-encoded data
string
required
File name to display
string
Parent folder ID (uploads to root if not specified)
string
Parent folder ID (alternative parameter for compatibility)
boolean
default:"true"
Whether to execute the upload

Response

string | null
Uploaded file’s UUID (null if upload failed)

Example

upload_private_file

Upload a file to a private chat.

Request

string
required
User QQ number
string
required
File path, URL, or Base64-encoded data
string
required
File name to display

Response

string | null
Uploaded file’s UUID

Example

get_group_file_url

Get download URL for a group file.

Request

string
required
Group number
string
required
File UUID from upload or file list
number
required
Business ID (usually 102 for group files)

Response

string
Download URL for the file

Example

get_private_file_url

Get download URL for a private file.

Request

string
required
User QQ number
string
required
File UUID

Response

string
Download URL for the file

Example

get_file

Get file information and download URL.

Request

string
required
File ID from message or file list

Response

string
Local file path or download URL
string
File name
number
File size in bytes
string
Download URL

Example

Group File System Management

get_group_root_files

Get files and folders in group’s root directory.
string
required
Group number

get_group_files_by_folder

Get files and folders in a specific folder.
string
required
Group number
string
required
Folder ID

get_group_file_system_info

Get group file system information (used space, file count, etc.).
string
required
Group number

create_group_file_folder

Create a new folder in group file system.
string
required
Group number
string
required
Folder name
string
Parent folder ID (root if not specified)

delete_group_file

Delete a file from group file system.
string
required
Group number
string
required
File UUID to delete
number
required
Business ID (usually 102)

delete_group_folder

Delete a folder from group file system.
string
required
Group number
string
required
Folder ID to delete

Media File Actions

get_image

Get image file information.
string
required
Image file name from message

get_record

Get voice/audio record file information.
string
required
Record file name from message
string
Output format (e.g., mp3, wav)

File Transfer Examples

Upload and Send File

Download File from Message

NapCat Extended File Actions

move_group_file

Move a file to a different folder in group file system.

rename_group_file

Rename a file in group file system.

trans_group_file

Transfer group file to another location.
File paths can be specified as:
  • Local absolute path: /path/to/file
  • File URI: file:///path/to/file
  • HTTP/HTTPS URL: https://example.com/file
  • Base64 data: base64://...