# Weixin Mini Program Open the WeChat Channels video

To cater to the diverse needs of developers, Weixin Mini Program offers two methods for accessing WeChat Channels videos:

  1. Switch to open the WeChat Channels video: No restrictions on the subject matter.

  2. Embedded WeChat Channels videos:

  • For versions 2.25.1 to 2.31.1 of the basic library, Weixin Mini Program must be associated with the same entity or related entities as the videos in the WeChat Channels feature.
  • Starting from version 2.31.1 of the basic library, non-personal entities Weixin Mini Program can embed videos from non-entity/associated entity WeChat Channels.

# Get parameters

# finderUserName

On behalf of WeChat ChannelsID, get WeChat ChannelsID need to login Weixin Channels Assistant , you can view your WeChat ChannelsID on the home page.

# feedId

The unique identifier representing the WeChat Channel video, obtaining the feedId for the video requires logging in Weixin Channels Assistant , in the "Dynamic Management" module you can copy the corresponding feedId for each video you publish.

# feed-token

Support from the base library 2.31.1

A symbol representing non-personalized WeChat Channel videos, applicable to entities other than individuals Weixin Mini Program can be accessed through [[ TAG-0-START]] channel- video]((channel-video)) A component that embeds videos from non-primary WeChat Channels within a Mini Program.

The steps to get feed-token are as follows:

  1. Log in to the MP platform , and find "Grant Access to WeChat Channels Video IDs" under "Settings-Basic Settings-Privacy and Security," then toggle the switch to enable it.

  2. On the mobile device, find the desired WeChat Channel video that you want to embed, and copy the feed-token of that video. The illustration is as follows:

When using this capability, developers need to be aware of:

  1. Time limit: It takes effect within 24 hours after the switch is turned on. When it is turned off, the mobile won't display the entrance to quote the video in Weixin Mini Program. To continue getting it, you'll need to turn on the switch again;

  2. Validity: The switch open state only applies to the current operator. That is, steps 1 and 2 mentioned above should be performed by the same operator. If Developer A turns on the "Enable access to WeChat Channel video IDs" switch within the MP platform,Only A is capable of replicating the feed-token for WeChat Channels videos on mobile devices, whereas other developers using Weixin Mini Program do not display the entry point for "Referencing this video within a mini program" on mobile platforms.

# How to use it

# Switch to open the WeChat Channels video.

2.19.2

Weixin Mini Program can be accessed via wx.openChannelsActivity The interface redirects to the video page of the specified WeChat Channels to watch the video, with no specific requirements for the content.

# Embedded WeChat Channels videos

2.25.1

Weixin Mini Program may be channel- video]((channel-video)) The component embeds WeChat Channels videos within the mini program, and it supports opening the corresponding video without any pop-up windows. When using this component, please be aware of the following:

  1. Component calls do not require qualifications
  2. Content for WeChat Channels that consists solely of images is not currently supported.
  3. Prior to version 2.31.1 of the basic library, only videos from WeChat Channels associated with the same entity or related entities could be referenced. Starting from version 2.31.1, support is introduced for embedding videos from WeChat Channels of non-personal entities within Mini programs.

# Principal judgment

# Subject information query

Weixin Mini Program The main information can be accessed through the "Development Team" section on the mini-program's information page. The main information for WeChat Channels can be found on the "Certification" page of the WeChat Channels homepage.

# Subject judgment logic

If Weixin Mini Program is associated with the same entity as the WeChat Channels, the relevant interfaces can be called. If Weixin Mini Program is associated with a different entity than the one responsible for the WeChat Channels, the following three conditions must be met simultaneously for the relevant interface to be called:

  1. Weixin Mini Program Tied to WeChat Open Platform account
  2. Weixin Mini Program and WeChat open platform account as the same subject or associated subject
  3. WeChat The list of main and associated entities for the Open Platform account includes entities related to WeChat Channels https://kf.qq.com/faq/190726e6JFja190726qMJBn6.html