# 二维码-获取

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /api/qw/doApi:
    post:
      summary: 二维码-获取
      deprecated: false
      description: >
        当旧设备取码提示“guid错误: 客户端实例不存在/不在线 ”
        需先调用[恢复实例](api-344613851)接口，调用成功后再次执行取码接口


        申请手机端授权登录，有两种方式

        - 主动扫码模式，useCache=false，默认，强制获取新的登录二维码，并使用手机主动扫码

        - 被动确认模式，useCache=true，推送登录授权消息到（实例上最近一次登录过的）账号对应的手机端
      tags:
        - 登陆模块
      parameters:
        - name: X-QIWEI-TOKEN
          in: header
          description: ''
          required: true
          example: '{{tokenId}}'
          schema:
            type: string
        - name: Content-Type
          in: header
          description: ''
          required: true
          example: application/json
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                method:
                  type: string
                  title: /login/getLoginQrcode
                params:
                  type: object
                  properties:
                    guid:
                      type: string
                      title: 实例id
                    useCache:
                      type: boolean
                      title: 是否使用缓存数据
                  required:
                    - guid
                    - useCache
                  x-apifox-orders:
                    - guid
                    - useCache
              required:
                - method
                - params
              x-apifox-orders:
                - method
                - params
              x-apifox-refs: {}
            example:
              method: /login/getLoginQrcode
              params:
                guid: '{{guid}}'
                useCache: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  data:
                    type: object
                    properties:
                      loginQrcodeBase64Data:
                        type: string
                        description: 实例上登过账号&&useCache=true时为空；否则有值
                        title: 二维码数据流
                      loginQrcodeKey:
                        type: string
                        title: 二维码key
                        description: '`loginQrcodeBase64Data`中的`key`'
                    required:
                      - loginQrcodeKey
                    x-apifox-orders:
                      - loginQrcodeBase64Data
                      - loginQrcodeKey
                  msg:
                    type: string
                required:
                  - code
                  - data
                  - msg
                x-apifox-orders:
                  - code
                  - data
                  - msg
              example:
                code: 0
                data:
                  loginQrcodeBase64Data: /9jqo8Zbik......UUUUV//Z
                  loginQrcodeKey: FFFFDDDDDFFFFFF
                msg: 成功
          headers: {}
          x-apifox-name: 成功
      security: []
      x-apifox-folder: 登陆模块
      x-apifox-status: released
      x-run-in-apifox: https://app.apifox.com/web/project/7051713/apis/api-344613856-run
components:
  schemas: {}
  securitySchemes: {}
servers: []
security: []

```