wx.miniapp.shareVideoMessage

View Markdown

Last edited on 2026-07-14

Share a video to WeChat

Note:

  1. This API is only applicable to multi-platform applications and is not supported within Mini Program
  2. This API cannot be debugged in the "Mobile App Assistant". Developers must build an APK or IPA package and install it on a mobile device to debug
  3. This API is now supported on the HarmonyOS platform

Pre-Integration Notes

Parameters

To facilitate developer understanding, the parameters of wx.miniapp.shareVideoMessage are consistent with the WeChat Open Platform Open SDK share interface parameters.

Attribute Type Default Value Required Description
videoUrl string - Yes Video link URL, length limit not exceeding 10KB
videoLowBandUrl string - No Video link URL for low-bandwidth environments, length limit not exceeding 10KB
title string - Yes Video title
description string - Yes Video description
thumbPath string - Yes Share thumbnail, supports code package image resource paths or local temporary, cache, and user files; network image paths are not supported
scene number - No Scene value
success function No Success callback after retrieval
fail function No Failure callback after retrieval

Note: videoUrl and videoLowBandUrl cannot both be empty.

Invocation Example

wx.miniapp.shareVideoMessage({
  videoUrl: 'https://encrypted-vtbn0.gstatic.com/video?q=tbn:ANd9GcQPt0qbJ-TMyXt_fKgwfjE4y2qqS543MIWjjQ',
  videoLowBandUrl: 'https://encrypted-vtbn0.gstatic.com/video?q=tbn:ANd9GcQPt0qbJ-TMyXt_fKgwfjE4y2qqS543MIWjjQ',
  title: 'title',
  description: 'description',
  thumbPath: '/pages/thumb.png',
  success(e) {
    console.log(`share video success: ${JSON.stringify(e)})`)
  },
  fail(e) {
    console.log(`share video failed: ${JSON.stringify(e)}`)
  }
})