文档
测试

checkUserAuth

POST
api/v1/checkUserAuth

接口描述

校验用户实名认证

请求参数

参数名
类型
描述
必填
user_id
integer
用户id:1
必填
token
integer
用户token:312dsae123e12da
必填
return
code
int 0已认证 1未认证 2认证中 3用户不存在 -1认证异常
必填

php

$client = new \GuzzleHttp\Client(); $response = $client->post( 'http://sns.shenruxiang.com/api/v1/checkUserAuth', [ 'headers' => [ 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], 'json' => [ 'user_id' => 9, 'token' => 14, 'return' => 'laborum', ], ] ); $body = $response->getBody(); print_r(json_decode((string) $body));

js

const url = new URL( "http://sns.shenruxiang.com/api/v1/checkUserAuth" ); let headers = { "Content-Type": "application/json", "Accept": "application/json", }; let body = { "user_id": 9, "token": 14, "return": "laborum" } fetch(url, { method: "POST", headers: headers, body: body }) .then(response => response.json()) .then(json => console.log(json));

返回值

{ "code": 0, "msg": "已认证", "data": [] }

bash

curl -X POST \ "http://sns.shenruxiang.com/api/v1/checkUserAuth" \ -H "Content-Type: application/json" \ -H "Accept: application/json" \ -d '{"user_id":9,"token":14,"return":"laborum"}'