文档
测试

getPhone

POST
api/v1/getPhone

接口描述

获取手机号

请求参数

参数名
类型
描述
必填
openid
string
微信标示
必填
iv
string
必填
encryptedData
string
必填

php请求demo

$client = new \GuzzleHttp\Client(); $response = $client->post( 'http://sns.shenruxiang.com/api/v1/getPhone', [ 'headers' => [ 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], 'json' => [ 'openid' => 'ea', 'iv' => 'optio', 'encryptedData' => 'architecto', ], ] ); $body = $response->getBody(); print_r(json_decode((string) $body));

js请求demo

const url = new URL( "http://sns.shenruxiang.com/api/v1/getPhone" ); let headers = { "Content-Type": "application/json", "Accept": "application/json", }; let body = { "openid": "ea", "iv": "optio", "encryptedData": "architecto" } 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/getPhone" \ -H "Content-Type: application/json" \ -H "Accept: application/json" \ -d '{"openid":"ea","iv":"optio","encryptedData":"architecto"}'