Skip to main content

Video Channel Authorization [MSDK Only]

[MSDK Only] MSDK wraps the WeChat Channels authorization interface. By calling the ChannelPermissionAuth interface, currently WeChat requires passing snsapi_channels_livestream. In MSDK’s callback, obtain tdiAuthBuffer for subsequent live stream login. This feature does not impose restrictions on the login channel or login status, meaning the interface can be invoked across platforms.

note
  • Currently only supports: "WeChat"
  • Currently, please set the permission list to snsapi_channels_livestream. This also serves as the marker for distinguishing normal login from permission requests at the lower level. WeChat may update the required permissions in the future
  • In the video account authorization callback, tdiAuthBuffer is present in the extraJson field, returned in Base64 format. Parse it via JSON and use standard Base64 decoding
  • Timeout callback logic is not supported yet
  • MSDK only returns tdiAuthBuffer. Contact WeChat points [jaryqiu] and [gisonyang] to check actual usage.

Supported platforms

Supports Android, iOS platform.

Function Definition

void ChannelPermissionAuth(string channel,  string permissions = "",  string subChannel = "", string extraJson = "");

Input Parameters

ParametersTypeDescription
channelstringChannel name
Case sensitive.Currently only supports: "WeChat"
permissionsstringPermission list granted by the channel
Multiple permissions separated by commas (,), currently requires the snsapi_channels_livestream permission.
subChannelstringSub-channel name
Case sensitive. Not supported yet; pass in null or exclude.
extraJsonstringExtended Fields
For more information, refer to the corresponding channel documentation.
Not supported yet; pass in null or exclude

Callback Handling

The callback handling interface is GUABaseResultObservers.The callback data structure is GUABaseResult.

The callback event is LoginBaseResultEvents. The callback ID is GUA_ACCOUNT_CHANNEL_PERMISSION_AUTH.

Code Example

UnionAdapterAPI.GetAccountService().ChannelPermissionAuth("WeChat");