All Products
Search
Document Center

Object Storage Service:0007-00000004

Last Updated:Mar 20, 2026

Problem description

The callbackUrl field in the callback parameter contains an invalid URL. OSS rejects the request and returns an error.

Causes

The callback parameter is Base64-encoded in the request. After decoding, it must be valid JSON that contains a callbackUrl field. Each URL in callbackUrl must be a valid URL, or OSS returns an error.

callbackUrl specifies the destination URLs where OSS sends callback requests after an object is successfully uploaded. It must meet the following requirements:

  • Contains up to five URLs, separated by semicolons (;). OSS tries each URL in order until one returns a success response.

  • Supports HTTPS URLs.

  • Must be URL-encoded if the value contains Chinese characters.

  • If left blank or omitted, upload callback is not configured.

Examples

The following is a decoded callback value that triggers this error:

{
  "callbackUrl": "www.callback-example.com:test",
  "callbackBody": "bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&imageInfo.height=${imageInfo.height}&imageInfo.width=${imageInfo.width}&imageInfo.format=${imageInfo.format}&my_var=${x:my_var}"
}

The callbackUrl value www.callback-example.com:test is invalid. The part after the colon (:) must be a positive integer port number — test is not.

Solutions

Make sure every URL in callbackUrl is a valid URL. Common mistakes to check:

  • Invalid port: The port must be a positive integer (e.g., :8080), not a string (e.g., :test).

  • Unencoded Chinese characters: URL-encode any Chinese characters in the value before setting the field.

References