Skip to content

Get Upload Token

  • Endpoint Path: /api/v2/global/upload-token
  • Method: GET
  • Request: Query

Headers Optional Parameter

Parameter NamePublic Mode (Required)Private Mode (Required)
X-Fresns-Aidrequiredrequired
X-Fresns-Aid-Tokenrequiredrequired
X-Fresns-Uidrequiredrequired
X-Fresns-Uid-Tokenrequiredrequired

Query Params

Parameter NameTypeRequiredDescription
typeStringrequiredChoose one from image, video, audio, document
nameStringrequiredFile name for this upload
expireTimeNumberrequiredExpiration time, unit: seconds
Up to 600 seconds

Return

json
{
    "code": 0,
    "message": "ok",
    "data": {
        "storageId": "Number / Storage service provider ID, see dictionary key-value",
        "token": "String / SDK upload token requested from the plugin",
        "expireTime": "Number / Expiration time, in seconds" // If not available, output null
    }
}

Released under the Apache-2.0 License