Updated on 2025-12-08 GMT+08:00

Querying Live Platforms

Function

Queries live platforms.

Calling Method

For details, see Calling APIs.

Authorization Information

Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions. For details about the required permissions, see Permissions Policies and Supported Actions.

URI

GET /v1/{project_id}/live-platforms/platforms

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID. For details about how to obtain the project ID, see Obtaining a Project ID.

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

offset

No

Integer

Offset where the query starts.

Value range:

0~2147483647

Default value:

0

limit

No

Integer

Number of items displayed on each page.

Value range:

1~100

Default value:

10

access_type

No

String

Interconnected platform type. |

  • MEITUAN_OFFICIAL: official API for Meituan's live platform

  • MSS_STANDARD: standard API defined by MetaStudio

Request Parameters

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

No

String

User token. This parameter is mandatory when token authentication is used.

You can obtain the token by calling the IAM API used to obtain a user token.

Value of X-Subject-Token in the response header.

Authorization

No

String

Authentication information. This parameter is mandatory for AK/SK authentication.

X-Sdk-Date

No

String

Time when the request is sent. This parameter is mandatory for AK/SK authentication.

The format is YYYYMMDD'T'HHMMSS'Z'.

X-Project-Id

No

String

Project ID. This parameter is mandatory for AK/SK authentication.

Response Parameters

Status code: 200

Table 4 Response header parameters

Parameter

Type

Description

X-Request-Id

String

Request ID.

Table 5 Response body parameters

Parameter

Type

Description

live_platforms

Array of LivePlatformInfo objects

Live platforms

Table 6 LivePlatformInfo

Parameter

Type

Description

platform_id

String

Platform ID

access_type

String

Interconnected platform type.

  • MEITUAN_OFFICIAL: official API for Meituan's live platform

  • MSS_STANDARD: standard API defined by MetaStudio

name

String

Live platform name

authorization_info

PlatformAuthorizationInfo object

Live platform authorization information

auth_config

CustomPlatformAuthConfig object

Authentication configuration of the custom live platform

callback_config

Array of StandardPlatformApiConfig objects

Callback configuration of the custom live platform. Only one configuration is retained for each type. If there are multiple configurations, one configuration is retained randomly.

Table 7 PlatformAuthorizationInfo

Parameter

Type

Description

authorize_state

String

Authorization status.

  • AUTHORIZED: authorized

  • UNAUTHORIZED: unauthorized

authorized_time

String

Authorization time

expire_time

String

Expiration time

account

String

Authorized account information.

For Meituan, set this parameter to opBizCode.

Table 8 CustomPlatformAuthConfig

Parameter

Type

Description

key

String

Key. This parameter is used for a custom live platform.

How to use:

When calling the API, add two header fields: x-hw-mss-time and x-hw-mss-secret.

  • x-hw-mss-time: current timestamp. Hexadecimal result of the Unix timestamp. The value is valid for one minute.

Example: 66df9308 (that is, 08:30:00 of September 10, 2024)

  • x-hw-mss-secret: authentication string. hmac_sha256 (Key, URI (The parameter product_query_url,query is sorted by Key in lexicographical order) + x-hw-mss-time)

Example:

URL https://api.example.com/v1/products?live_id=111&limit=10&offset=0

Key: GCTbw44s6MPLh4GqgDpnfuFHgy25Enly

hwTime: 66df9308

x-hw-mss-secret=hmac_sha256(GCTbw44s6MPLh4GqgDpnfuFHgy25Enly,api.example.com/v1/products?limit=10&live_id=111&offset=066df9308)=5e7fe8869a12a87ea966d9edbc02e38cd4ce62c73b8b05c638f15835e78902d7

x-hw-mss-secret: 5e7fe8869a12a87ea966d9edbc02e38cd4ce62c73b8b05c638f15835e78902d7

Table 9 StandardPlatformApiConfig

Parameter

Type

Description

api_type

String

API type.

  • PRODUCT_QUERY: product query

  • LIVE_EVENT_CALLBACK: live streaming event callback

url

String

URL. Only HTTPS URLs are supported.

Status code: 400

Table 10 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error description.

Status code: 401

Table 11 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error description.

Status code: 500

Table 12 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error description.

Example Requests

GET https://metastudio.xxxx.myhuaweicloud.com/v1/{project_id}/live-platforms/platforms

Example Responses

Status code: 200

Successful.

{
  "live_platforms" : [ {
    "name" : "meituan"
  } ]
}

Status code: 400

Parameters error, including the error code and its description.

{
  "error_code" : "MSS.00000003",
  "error_msg" : "Invalid parameter"
}

Status code: 401

Authentication is not performed or fails.

{
  "error_code" : "MSS.00000001",
  "error_msg" : "Unauthorized"
}

Status code: 500

Internal service error.

{
  "error_code" : "MSS.00000004",
  "error_msg" : "Internal Error"
}

Status Codes

Status Code

Description

200

Successful.

400

Parameters error, including the error code and its description.

401

Authentication is not performed or fails.

500

Internal service error.

Error Codes

See Error Codes.