Public
Documentation Settings

hair

user

用户操作

GET获取用户鉴权

api.jswei.cn/v1/get_access_token?client_id=10001&secret=UoyWJsLyNnTzYx53ZJ9gjL0CNmj79pIw
PARAMS
client_id

10001

secret

UoyWJsLyNnTzYx53ZJ9gjL0CNmj79pIw

Example Request
curl
curl --location 'api.jswei.cn/v1/get_access_token?client_id=10000&secret=nGk5R2wrnZqQ02bed29rjzax1QWRIu1O' \
--header 'client_id: 10000' \
--header 'secret: nGk5R2wrnZqQ02bed29rjzax1QWRIu1O'
200 OK
Example Response
json
{
  "status": 1,
  "message": "success",
  "access_token": "U2FsdGVkX1/svYgHts+DtzBMuNhrPwi/OVCmAGCZVAs=",
  "expires": 72000
}
Connection

keep-alive

Options that are desired for the connection
Content-Type

application/json; charset=utf-8

The mime type of this content
Date

Fri, 27 Apr 2018 05:19:43 GMT

The date and time that the message was sent
Server

nginx

A name for the server
Transfer-Encoding

chunked

The form of encoding used to safely transfer the entity to the user. Currently defined methods are: chunked, compress, deflate, gzip, identity.
X-Powered-By

PHP/7.1.13

Specifies the technology (ASP.NET, PHP, JBoss, e.g.) supporting the web application (version details are often in X-Runtime, X-Version, or X-AspNet-Version)

GET根据access_token换取用户信息

api.jswei.cn/v1/access_token?access_token=U2FsdGVkX18xZBl7pgtmZD2jBAwQhZLHt2XD7UWVkDI=
AUTHORIZATIONOAuth 2.0
Access Token

<access-token>

PARAMS
access_token

U2FsdGVkX18xZBl7pgtmZD2jBAwQhZLHt2XD7UWVkDI=

Example Request
curl
curl --location 'api.jswei.cn/v1/access_token?access_token=U2FsdGVkX18xZBl7pgtmZD2jBAwQhZLHt2XD7UWVkDI%3D'
200 OK
Example Response
json
{
  "status": 1,
  "message": "query success!",
  "user": {
    "user_id": 4,
    "phone": "13584866592",
    "information": "",
    "sex": "男",
    "nickname": null,
    "head": null,
    "hobbies": null,
    "client_id": "10003",
    "secret": "U2FsdGVkX18wyU670R1MPLU8KFwWhAy4FLZRQYoqpyg=",
    "email": "524314430@qq.com",
    "city": null,
    "address": null
  }
}
Connection

keep-alive

Options that are desired for the connection
Content-Type

application/json; charset=utf-8

The mime type of this content
Date

Fri, 27 Apr 2018 09:33:32 GMT

The date and time that the message was sent
Server

nginx

A name for the server
Transfer-Encoding

chunked

The form of encoding used to safely transfer the entity to the user. Currently defined methods are: chunked, compress, deflate, gzip, identity.
X-Powered-By

PHP/7.1.13

Specifies the technology (ASP.NET, PHP, JBoss, e.g.) supporting the web application (version details are often in X-Runtime, X-Version, or X-AspNet-Version)

GET获取用户信息

api.jswei.cn/v1/user/6
AUTHORIZATIONBasic Auth
Username

<username>

Password

<password>

Example Request
curl
curl --location 'api.jswei.cn/v1/user/6'
200 OK
Example Response
json
{
  "status": 1,
  "message": "done!query success!",
  "user": {
    "user_id": 6,
    "username": "13584866592",
    "information": "",
    "sex": "男",
    "nickname": null,
    "head": null,
    "hobbies": null,
    "client_id": "0000000001",
    "secret": "4b2pIaHWl9g1OSWSIt35GLWeoP14xVsG",
    "email": "524314430@qq.com",
    "region": null,
    "address": null
  }
}
Connection

keep-alive

Options that are desired for the connection
Content-Type

application/json; charset=utf-8

The mime type of this content
Date

Tue, 22 May 2018 01:13:36 GMT

The date and time that the message was sent
Server

nginx

A name for the server
Transfer-Encoding

chunked

The form of encoding used to safely transfer the entity to the user. Currently defined methods are: chunked, compress, deflate, gzip, identity.
X-Powered-By

PHP/7.1.17

Specifies the technology (ASP.NET, PHP, JBoss, e.g.) supporting the web application (version details are often in X-Runtime, X-Version, or X-AspNet-Version)