LANYINGDevelopers
Web & Mini ProgramiOSAndroidC++Server API

6 File manipulation interface#

6.1 Download avatar#

GET /file/download/avatar

Request Header#

ParameterData TypeRequiredDescription
access-tokenstringfalseToken
app_idstringtrueApp ID
group_idint64falseThis field can be set only if access-token is an Admin token, means call this interface as an Admin for this group ID
user_idint64falseThis 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#

ParameterData TypeRequiredDescription
hdoublefalseImage height
image_typeint32falseImage type, 1: original, 2: thumbnail, 3: cover
object_namestringtrueObject name
sdk_signstringfalseSDK signature
store_tokenstringfalseFile token
thumbnail_strategyint32falseThumbnail generation policy, 1 - generated by third-party server, 2 - generated by local server, default 1
wdoublefalseImage width

Response Body#

● 200 Response data format:JSON

Interface Description#

6.2 Download chat file#

GET /file/download/chat

Request Header#

ParameterData TypeRequiredDescription
access-tokenstringfalseToken
app_idstringtrueApp ID
group_idint64falseThis field can be set only if access-token is an Admin token, means call this interface as an Admin for this group ID
user_idint64falseThis 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#

ParameterData TypeRequiredDescription
file_signstringtrueFile signature
formatstringfalseAudio file format to download, amr/mp3, default amr
hdoublefalseImage height
image_typeint32falseImage type, 1: original, 2: thumbnail, 3: cover
sdk_signstringfalseSDK signature
sourcestringfalseRequest source, miniprogram, default ‘'
store_tokenstringfalseFile token
thumbnail_strategyint32falseThumbnail generation policy, 1 - generated by third-party server, 2 - generated by local server, default 1
wdoublefalseImage 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#

ParameterData TypeRequiredDescription
access-tokenstringfalseToken
app_idstringtrueApp ID
user_idint64falseThis 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#

ParameterData TypeRequiredDescription
group_idint64truegroup_id

Response Body#

● 200 Response data format:JSON

ParameterTypeDescription
codeint32Response code; 200 indicates success
dataobjectResult data
⇥ download_urlstringDownload address
⇥ oss_body_paramobjectOSS parameters to be set when uploading
⇥ upload_methodstringUpload method: POST/PUT
⇥ upload_urlstringUpload address
messagestringError information, null means success

Interface Description#

6.4 Get the URL of uploading user avatar#

GET /file/upload/avatar/user

Request Header#

ParameterData TypeRequiredDescription
access-tokenstringfalseToken
app_idstringtrueApp ID
group_idint64falseThis field can be set only if access-token is an Admin token, means call this interface as an Admin for this group ID
user_idint64falseThis 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

ParameterTypeDescription
codeint32Response code; 200 indicates success
dataobjectResult data
⇥ download_urlstringDownload address
⇥ oss_body_paramobjectOSS parameters to be set when uploading
⇥ upload_methodstringUpload method: POST/PUT
⇥ upload_urlstringUpload address
messagestringError information, null means success

Interface Description#

6.5 Get the URL of uploading chat file#

GET /file/upload/chat

Request Header#

ParameterData TypeRequiredDescription
access-tokenstringfalseToken
app_idstringtrueApp ID
group_idint64falseThis field can be set only if access-token is an Admin token, means call this interface as an Admin for this group ID
user_idint64falseThis 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#

ParameterData TypeRequiredDescription
file_typeint32trueFile 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_idint64trueto_id
to_typeint32false1: User,2: Group

Response Body#

● 200 Response data format:JSON

ParameterTypeDescription
codeint32Response code; 200 indicates success
dataobjectResult data
⇥ download_urlstringDownload address
⇥ oss_body_paramobjectOSS parameters to be set when uploading
⇥ upload_methodstringUpload method: POST/PUT
⇥ upload_urlstringUpload address
messagestringError information, null means success

Interface Description#

6.6 Get the URL of forwarded chat file#

GET /file/upload/forward

Request Header#

ParameterData TypeRequiredDescription
access-tokenstringfalseToken
app_idstringtrueApp ID
group_idint64falseThis field can be set only if access-token is an Admin token, means call this interface as an Admin for this group ID
user_idint64falseThis 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#

ParameterData TypeRequiredDescription
file_signstringtrueFile signature
to_idint64trueto_id
to_typeint32false1: User,2: Group

Response Body#

● 200 Response data format:JSON

ParameterTypeDescription
codeint32Response code; 200 indicates success
datastringResult data
messagestringError information, null means success

Interface Description#

Generated API content with concise AI notes where context helps.