viewQr
Bắt đầu hỗ trợ ở phiên bản:
- API: 2.5.3
 
Lưu ý
Với API version ﹤ 2.23.0, phải gọi api login trước khi gọi api này và cần xin cấp quyền tại trang Quản lý ứng dụng
Cho phép ứng dụng hiển thị QR code của OA.
Parameters
Object object
| Property | Type | Default | Required | Description | Minimum Version | 
|---|---|---|---|---|---|
| id | string | true | Id của OA | ||
| displayName | string | Tên hiển thị của QR code | |||
| success | function | Callback function khi gọi api thành công | |||
| fail | function | Callback function khi gọi api thất bại | 
Sample Code
import api from 'zmp-sdk';
api.viewQr({
  id: '765465772305886642',
  displayName: 'Galaxy Cinema',
  success: (data) => {
    // xử lý khi gọi api thành công
    console.log(data);
  },
  fail: (error) => {
    // xử lý khi gọi api thất bại
    console.log(error);
  }
});
// hoặc
const test = async () => {
  try {
    const data = await api.viewQr({
      id: '765465772305886642',
      displayName: 'Galaxy Cinema'
    });
  } catch (error) {
    // xử lý khi gọi api thất bại
    console.log(error);
  }
};