openProfile
Bắt đầu hỗ trợ ở phiên bản:
- SDK: 2.5.3
import { openProfile } from "zmp-sdk/apis";
API cho phép ứng dụng mở profile của User hoặc Official Account.
Ví dụ
Mở cửa sổ chat với người dùng:
await openProfile({
type: "user",
id: "user-id",
});
Mở profile của Official Account:
await openProfile({
type: "oa",
id: "oa-id",
});
Tham số
Truyền tham số vào API dưới dạng object chứa các thuộc tính:
Name | Type | Default | Description |
---|---|---|---|
type | "user" | "oa" | "aliasOA" | Nhận các giá trị sau:
| |
id | string | Id của User hoặc OA. |