# 刷新AccessToken

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /chatroom/api/token:
    post:
      summary: 刷新AccessToken
      deprecated: false
      description: ''
      tags:
        - HTTP接口/OAuth
      parameters:
        - name: Content-Type
          in: header
          description: ''
          required: true
          example: application/x-www-form-urlencoded
          schema:
            type: string
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                grant_type:
                  description: 授权类型, 目前支持 authorization_code 和 refresh_token
                  example: refresh_token
                  type: string
                client_id:
                  description: 客户端id
                  example: '000000'
                  type: string
                client_secret:
                  description: 客户端密钥
                  example: '999999'
                  type: string
                refresh_token:
                  description: 刷新token
                  example: NJCYZDC1MJGTYZA1OC01MGM0LWIYNJATNZGZZJQYNWEZOWFK
                  type: string
              required:
                - grant_type
                - client_id
                - client_secret
                - refresh_token
            examples: {}
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  access_token:
                    type: string
                    description: AccessToken
                  expires_in:
                    type: integer
                    description: 有效期时间(秒)
                  refresh_token:
                    type: string
                    description: 用于刷新access_token
                  scope:
                    type: string
                    description: 用户授权给该应用的能力范围, 空格分隔
                  token_type:
                    type: string
                    description: Token类型, 目前固定为 Bearer
                required:
                  - access_token
                  - expires_in
                  - refresh_token
                  - scope
                  - token_type
                x-apifox-orders:
                  - access_token
                  - expires_in
                  - refresh_token
                  - scope
                  - token_type
              example:
                access_token: >-
                  eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiI4ODM2MjU3IiwiYXVkIjpbIjAwMDAwMCJdLCJleHAiOjE3NTM4NjgwNDZ9.3s0PyOiNj8FnndvDO9_whMqyjTDhV2fBCSxfc2BZQc4
                expires_in: 7200
                refresh_token: MMQXODA4NDETMGU2ZC01MZI2LTLKNGUTZDHHNDY1NDQ0ZDK3
                scope: user_info_read
                token_type: Bearer
          headers: {}
          x-apifox-name: 成功
      security: []
      x-apifox-folder: HTTP接口/OAuth
      x-apifox-status: developing
      x-run-in-apifox: https://app.apifox.com/web/project/4856361/apis/api-329079907-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: []

```
