6 File manipulation interface

6.1 Download avatar

GET /file/download/avatar

Request Header

Parameter name Data Type Required Description
access-token string false Token
app_id string true App ID
group_id int64 false This field can be set only if access-token is an Admin token, means call this interface as an Admin for this group ID
user_id int64 false This field can be set only if access-token is a user token, means call this interface as a group member for this user ID

Query Param

Parameter name Data Type Required Description
h double false Image height
image_type int32 false Image type, 1: original, 2: thumbnail, 3: cover
object_name string true Object name
sdk_sign string false SDK signature
store_token string false File token
thumbnail_strategy int32 false Thumbnail generation policy, 1 - generated by third-party server, 2 - generated by local server, default 1
w double false Image width

Response Body

● 200 Response data format:JSON

Interface Description

6.2 Download chat file

GET /file/download/chat

Request Header

Parameter name Data Type Required Description
access-token string false Token
app_id string true App ID
group_id int64 false This field can be set only if access-token is an Admin token, means call this interface as an Admin for this group ID
user_id int64 false This field can be set only if access-token is a user token, means call this interface as a group member for this user ID

Query Param

Parameter name Data Type Required Description
file_sign string true File signature
format string false Audio file format to download, amr/mp3, default amr
h double false Image height
image_type int32 false Image type, 1: original, 2: thumbnail, 3: cover
sdk_sign string false SDK signature
source string false Request source, miniprogram, default ‘'
store_token string false File token
thumbnail_strategy int32 false Thumbnail generation policy, 1 - generated by third-party server, 2 - generated by local server, default 1
w double false Image width

Response Body

● 200 Response data format:JSON

Interface Description

6.3 Get the URL of uploading group avatar

GET /file/upload/avatar/group

Request Header

Parameter name Data Type Required Description
access-token string false Token
app_id string true App ID
user_id int64 false This field can be set only if access-token is a user token, means call this interface as a group member for this user ID

Query Param

Parameter name Data Type Required Description
group_id int64 true group_id

Response Body

● 200 Response data format:JSON

Parameter name Type Description
code int32 Return code, 200 is success
data object Result data
⇥ download_url string Download address
⇥ oss_body_param object OSS parameters to be set when uploading
⇥ upload_method string Upload method: POST/PUT
⇥ upload_url string Upload address
message string Error information, null means success

Interface Description

6.4 Get the URL of uploading user avatar

GET /file/upload/avatar/user

Request Header

Parameter name Data Type Required Description
access-token string false Token
app_id string true App ID
group_id int64 false This field can be set only if access-token is an Admin token, means call this interface as an Admin for this group ID
user_id int64 false This field can be set only if access-token is a user token, means call this interface as a group member for this user ID

Response Body

● 200 Response data format:JSON

Parameter name Type Description
code int32 Return code, 200 is success
data object Result data
⇥ download_url string Download address
⇥ oss_body_param object OSS parameters to be set when uploading
⇥ upload_method string Upload method: POST/PUT
⇥ upload_url string Upload address
message string Error information, null means success

Interface Description

6.5 Get the URL of uploading chat file

GET /file/upload/chat

Request Header

Parameter name Data Type Required Description
access-token string false Token
app_id string true App ID
group_id int64 false This field can be set only if access-token is an Admin token, means call this interface as an Admin for this group ID
user_id int64 false This field can be set only if access-token is a user token, means call this interface as a group member for this user ID

Query Param

Parameter name Data Type Required Description
file_type int32 true File Type 100: plain chat file, 101: voice chat file (in .amr), 102: picture chat file, 103: video chat file, 104: voice chat file (in .mp3), 200: shared plain file, 201: shared voice file, 202: shared picture file, 203: shared video file
to_id int64 true to_id
to_type int32 false 1: User,2: Group

Response Body

● 200 Response data format:JSON

Parameter name Type Description
code int32 Return code, 200 is success
data object Result data
⇥ download_url string Download address
⇥ oss_body_param object OSS parameters to be set when uploading
⇥ upload_method string Upload method: POST/PUT
⇥ upload_url string Upload address
message string Error information, null means success

Interface Description

6.6 Get the URL of forwarded chat file

GET /file/upload/forward

Request Header

Parameter name Data Type Required Description
access-token string false Token
app_id string true App ID
group_id int64 false This field can be set only if access-token is an Admin token, means call this interface as an Admin for this group ID
user_id int64 false This field can be set only if access-token is a user token, means call this interface as a group member for this user ID

Query Param

Parameter name Data Type Required Description
file_sign string true File signature
to_id int64 true to_id
to_type int32 false 1: User,2: Group

Response Body

● 200 Response data format:JSON

Parameter name Type Description
code int32 Return code, 200 is success
data string Result data
message string Error information, null means success

Interface Description

© 2019-2023 MaximTop | Homepage Last modified time: 2022-09-21 11:43:07

results matching ""

    No results matching ""