# nginxWebUI

## 8. 获取token

### 8.1. 获取Token

URL: /token/getToken

Type: GET

Content-Type: application/x-www-form-urlencoded;charset=UTF-8

Description: 其他接口调用需要在http请求header中添加token, 其中token的获取需要先在管理员管理中, 打开用户的接口调用权限,
然后通过用户名密码调用获取token接口, 才能得到token

Query-parameters:

Parameter | Type | Description | Required | Since
--- | --- | --- | --- | ---
name | string | 用户名 | false | -
pass | string | 密码 | false | -

Request-example:

    curl -X GET -i /token/getToken?pass=&name=

Response-fields:

Field | Type | Description | Since
--- | --- | --- | ---
success | boolean | 请求结果 | -
status | string | 请求状态 200:请求成功 401:token无效 500:服务器错误 | -
msg | string | 错误信息 | -
obj | object | 返回内容 | -

Response-example:

    {
      "success": true,
      "status": "",
      "msg": "",
      "obj": {}
    }