# 获取用户信息-自动触发授权

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /chatroom/api/account/info:
    get:
      summary: 获取用户信息-自动触发授权
      deprecated: false
      description: 在发起api请求时可以携带以下query作为参数 如果没有token且用户在线则会为用户唤起授权弹窗
      tags:
        - HTTP接口/OAuth
      parameters:
        - name: user_id
          in: query
          description: 用户ID
          required: false
          example: '000000'
          schema:
            type: string
        - name: client_id
          in: query
          description: 客户端ID
          required: true
          example: '000000'
          schema:
            type: string
        - name: redirect_uri
          in: query
          description: 回调地址
          required: true
          example: http%3A%2F%2Flocalhost
          schema:
            type: string
        - name: scope
          in: query
          description: 申请的权限 多个权限以空格分隔
          required: true
          example: user_info_read%20user_chat_duration_read
          schema:
            type: string
        - name: Authorization
          in: header
          description: Bearer Access Token
          required: true
          example: >-
            Bearer
            eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiI4ODM2MjU3IiwiYXVkIjpbImZlOTM5N2MxLTUzODQtNDIxZi04MGFlLTI2ZDIxMGQ0NDU0YyJdLCJleHAiOjE3NTM5NDk1NDl9.X4MsIDy1udt3yOoWW_n8EtjZxygoUFuC4tdALBZgNVM
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  msg:
                    type: string
                  result:
                    type: object
                    properties:
                      avatar:
                        type: string
                        description: 用户头像
                      username:
                        type: string
                        description: 用户名
                    required:
                      - avatar
                      - username
                    x-apifox-orders:
                      - avatar
                      - username
                  status:
                    type: string
                required:
                  - msg
                  - result
                  - status
                x-apifox-orders:
                  - msg
                  - result
                  - status
              example:
                msg: ''
                result:
                  avatar: >-
                    https://cdn.max-c.com/app/heybox/icon_83.5@3x.png?imageMogr2/thumbnail/!100p/format/jpg
                  username: 玩家8836257
                status: ok
          headers: {}
          x-apifox-name: 成功
      security:
        - apikey-header-token: []
      x-apifox-folder: HTTP接口/OAuth
      x-apifox-status: developing
      x-run-in-apifox: https://app.apifox.com/web/project/4856361/apis/api-331602654-run
components:
  schemas: {}
  securitySchemes:
    token:
      type: apikey
      in: header
      name: token
      token: ODYzNzY0NDM7MTc1NTc1OTk1NzYyODYzNjQ0NzsxNTU0MDM2NTkxNzk2OTM1OTY5
    apikey-header-token:
      type: apiKey
      in: header
      name: token
servers:
  - url: http://prod-cn.your-api-server.com
    description: 正式环境
security:
  - apikey-header-token: []

```
