API
用户
Union ID
登录
{{serverUrl}} /api/AppUsers/:appId /UnionIDSignIn
请求参数 示例 返回数据
说明
请求方式
POST
登陆凭证
不需要
platform
第三方平台标识字符串
web、weibo、wexin、qq / 自定义
unionID
第三方平台的用户ID
cURL C# Java NodeJs Python JavaScript
curl --location 'https://www.oauthapp.com/api/AppUsers/:appId/UnionIDSignIn' \
--header 'Content-Type: application/json' \
--data '{"platform": "","unionID": ""}'
var client = new RestClient ( "https://www.oauthapp.com/api/AppUsers/:appId/UnionIDSignIn" );
client . Timeout = - 1 ;
var request = new RestRequest ( Method . POST );
request . AddHeader ( "Content-Type" , "application/json" );
var body = @"{" + "\n" +
@" ""platform"": ""web""," + "\n" +
@" ""unionID"": ""123456""" + "\n" +
@"}" ;
request . AddParameter ( "application/json" , body , ParameterType . RequestBody );
IRestResponse response = client . Execute ( request );
Console . WriteLine ( response . Content );
OkHttpClient client = new OkHttpClient (). newBuilder ()
. build ();
MediaType mediaType = MediaType . parse ( "application/json" );
RequestBody body = RequestBody . create ( mediaType , "{\n \"platform\": \"web\",\n \"unionID\": \"123456\"\n}" );
Request request = new Request . Builder ()
. url ( "https://www.oauthapp.com/api/AppUsers/:appId/UnionIDSignIn" )
. method ( "POST" , body )
. addHeader ( "Content-Type" , "application/json" )
. build ();
Response response = client . newCall ( request ). execute ();
var axios = require ( 'axios' );
var data = JSON . stringify ({
"platform" : "web" ,
"unionID" : "123456"
});
var config = {
method : 'post' ,
url : 'https://www.oauthapp.com/api/AppUsers/:appId/UnionIDSignIn' ,
headers : {
'Content-Type' : 'application/json'
},
data : data
};
axios ( config )
. then ( function ( response ) {
console . log ( JSON . stringify ( response . data ));
})
. catch ( function ( error ) {
console . log ( error );
});
import http.client
import json
conn = http . client . HTTPSConnection ( "www.oauthapp.com" )
payload = json . dumps ({
"platform" : "web" ,
"unionID" : "123456"
})
headers = {
'Content-Type' : 'application/json'
}
conn . request ( "POST" , "/api/AppUsers/:appId/UnionIDSignIn" , payload , headers )
res = conn . getresponse ()
data = res . read ()
print ( data . decode ( "utf-8" ))
var myHeaders = new Headers ();
myHeaders . append ( "Content-Type" , "application/json" );
var raw = JSON . stringify ({ "platform" : "web" , "unionID" : "123456" });
var requestOptions = {
method : 'POST' ,
headers : myHeaders ,
body : raw ,
redirect : 'follow'
};
fetch ( "https://www.oauthapp.com/api/AppUsers/:appId/UnionIDSignIn" , requestOptions )
. then ( response => response . text ())
. then ( result => console . log ( result ))
. catch ( error => console . log ( 'error' , error ));
在线调试
注册
{{serverUrl}} /api/AppUsers/:appId /UnionIDSignUp
请求参数 示例 返回数据
说明
请求方式
POST
登陆凭证
不需要
unionId
第三方平台的用户ID
oauthapp.settings.fingerIdentity / 自定义
platform
第三方平台标识字符串
web、weibo、wexin、qq、dingtalk / 自定义
pwd
密码,可空
默认为:123456
username
登录账号,可空,默认与unionId一致
nickname
昵称,可空
avatar
头像,可空
data
自定义数据,可空
phone
手机号,可空
如果应用配置了验证手机,则必填
phoneCode
手机验证码,可空
如果应用配置了验证手机,则必填
email
邮箱,可空
如果应用配置了验证邮箱,则必填
emailCode
邮箱已验证,可空
如果应用配置了验证邮箱,则必填
cURL C# Java NodeJs Python JavaScript
curl --location 'https://www.oauthapp.com/api/AppUsers/:appId/UnionIDSignUp' \
--header 'Content-Type: application/json' \
--data '{"platform": "","pwd": "","unionID": "","nickName": "","avatar": "","data": "","email": "","emailCode": "","phone": "","phoneCode": ""}'
var client = new HttpClient ();
var request = new HttpRequestMessage ( HttpMethod . Post , "https://www.oauthapp.com/api/AppUsers/:appId/UnionIDSignUp" );
var content = new StringContent ( "{\"platform\": \"\",\"pwd\": \"\",\"unionID\": \"\",\"nickName\":\"\",\"avatar\": \"\",\"data\": \"\",\"email\": \"\",\"emailCode\": \"\",\"phone\": \"\",\"phoneCode\": \"\"}" , null , "application/json" );
request . Content = content ;
var response = await client . SendAsync ( request );
response . EnsureSuccessStatusCode ();
Console . WriteLine ( await response . Content . ReadAsStringAsync ());
OkHttpClient client = new OkHttpClient (). newBuilder ()
. build ();
MediaType mediaType = MediaType . parse ( "application/json" );
RequestBody body = RequestBody . create ( mediaType , "{\"platform\": \"\",\"pwd\": \"\",\"unionID\":\"\",\"nickName\": \"\",\"avatar\": \"\",\"data\": \"\",\"email\": \"\",\"emailCode\": \"\",\"phone\": \"\",\"phoneCode\": \"\"}" );
Request request = new Request . Builder ()
. url ( "https://www.oauthapp.com/api/AppUsers/:appId/UnionIDSignUp" )
. method ( "POST" , body )
. addHeader ( "Content-Type" , "application/json" )
. build ();
Response response = client . newCall ( request ). execute ();
const axios = require ( 'axios' );
let data = JSON . stringify ({
"platform" : "" ,
"pwd" : "" ,
"unionID" : "" ,
"nickName" : "" ,
"avatar" : "" ,
"data" : "" ,
"email" : "" ,
"emailCode" : "" ,
"phone" : "" ,
"phoneCode" : ""
});
let config = {
method : 'post' ,
maxBodyLength : Infinity ,
url : 'https://www.oauthapp.com/api/AppUsers/:appId/UnionIDSignUp' ,
headers : {
'Content-Type' : 'application/json'
},
data : data
};
axios . request ( config )
. then (( response ) => {
console . log ( JSON . stringify ( response . data ));
})
. catch (( error ) => {
console . log ( error );
});
import http.client
import json
conn = http . client . HTTPSConnection ( "www.oauthapp.com" )
payload = json . dumps ({
"platform" : "" ,
"pwd" : "" ,
"unionID" : "" ,
"nickName" : "" ,
"avatar" : "" ,
"data" : "" ,
"email" : "" ,
"emailCode" : "" ,
"phone" : "" ,
"phoneCode" : ""
})
headers = {
'Content-Type' : 'application/json'
}
conn . request ( "POST" , "/api/AppUsers/:appId/UnionIDSignUp" , payload , headers )
res = conn . getresponse ()
data = res . read ()
print ( data . decode ( "utf-8" ))
var myHeaders = new Headers ();
myHeaders . append ( "Content-Type" , "application/json" );
var raw = JSON . stringify ({
"platform" : "" ,
"pwd" : "" ,
"unionID" : "" ,
"nickName" : "" ,
"avatar" : "" ,
"data" : "" ,
"email" : "" ,
"emailCode" : "" ,
"phone" : "" ,
"phoneCode" : ""
});
var requestOptions = {
method : 'POST' ,
headers : myHeaders ,
body : raw ,
redirect : 'follow'
};
fetch ( "https://www.oauthapp.com/api/AppUsers/:appId/UnionIDSignUp" , requestOptions )
. then ( response => response . text ())
. then ( result => console . log ( result ))
. catch ( error => console . log ( 'error' , error ));
在线调试
账号密码
登录
{{serverUrl}} /api/AppUsers/:appId /SignIn
请求参数 示例 返回数据
说明
请求方式
POST
登陆凭证
不需要
userName
登录账号
password
登陆密码
cURL C# Java NodeJs Python JavaScript
curl --location 'https://www.oauthapp.com/api/AppUsers/:appId/SignIn' \
--header 'Content-Type: application/json' \
--data '{"pwd": "","userName": ""}'
var client = new HttpClient ();
var request = new HttpRequestMessage ( HttpMethod . Post , "https://www.oauthapp.com/api/AppUsers/:appId/SignIn" );
var content = new StringContent ( "{\"pwd\": \"\",\"userName\": \"\"}" , null , "application/json" );
request . Content = content ;
var response = await client . SendAsync ( request );
response . EnsureSuccessStatusCode ();
Console . WriteLine ( await response . Content . ReadAsStringAsync ());
OkHttpClient client = new OkHttpClient (). newBuilder ()
. build ();
MediaType mediaType = MediaType . parse ( "application/json" );
RequestBody body = RequestBody . create ( mediaType , "{\"pwd\": \"\",\"userName\": \"\"}" );
Request request = new Request . Builder ()
. url ( "https://www.oauthapp.com/api/AppUsers/:appId/SignIn" )
. method ( "POST" , body )
. addHeader ( "Content-Type" , "application/json" )
. build ();
Response response = client . newCall ( request ). execute ();
const axios = require ( 'axios' );
let data = JSON . stringify ({
"pwd" : "" ,
"userName" : ""
});
let config = {
method : 'post' ,
maxBodyLength : Infinity ,
url : 'https://www.oauthapp.com/api/AppUsers/:appId/SignIn' ,
headers : {
'Content-Type' : 'application/json'
},
data : data
};
axios . request ( config )
. then (( response ) => {
console . log ( JSON . stringify ( response . data ));
})
. catch (( error ) => {
console . log ( error );
});
import http.client
import json
conn = http . client . HTTPSConnection ( "www.oauthapp.com" )
payload = json . dumps ({
"pwd" : "" ,
"userName" : ""
})
headers = {
'Content-Type' : 'application/json'
}
conn . request ( "POST" , "/api/AppUsers/:appId/SignIn" , payload , headers )
res = conn . getresponse ()
data = res . read ()
print ( data . decode ( "utf-8" ))
var myHeaders = new Headers ();
myHeaders . append ( "Content-Type" , "application/json" );
var raw = JSON . stringify ({
"pwd" : "" ,
"userName" : ""
});
var requestOptions = {
method : 'POST' ,
headers : myHeaders ,
body : raw ,
redirect : 'follow'
};
fetch ( "https://www.oauthapp.com/api/AppUsers/:appId/SignIn" , requestOptions )
. then ( response => response . text ())
. then ( result => console . log ( result ))
. catch ( error => console . log ( 'error' , error ));
在线调试
注册
{{serverUrl}} /api/AppUsers/:appId /SignUp
请求参数 示例 返回数据
说明
请求方式
POST
登陆凭证
不需要
userName
登录账号
pwd
登陆密码
nickName
昵称,可空
avatar
头像,可空
data
自定义数据,可空
phone
手机号,可空
如果应用配置了验证手机,则必填
phoneCode
手机验证码,可空
如果应用配置了验证手机,则必填
email
邮箱,可空
如果应用配置了验证邮箱,则必填
emailCode
邮箱已验证,可空
如果应用配置了验证邮箱,则必填
cURL C# Java NodeJs Python JavaScript
curl --location 'https://www.oauthapp.com/api/AppUsers/:appId/SignUp' \
--header 'Content-Type: application/json' \
--data '{"pwd": "","userName": "","nickName": "","avatar": "","data": "","email": "","emailCode": "","phone": "","phoneCode": ""}'
var client = new HttpClient ();
var request = new HttpRequestMessage ( HttpMethod . Post , "https://www.oauthapp.com/api/AppUsers/:appId/SignUp" );
var content = new StringContent ( "{\"pwd\": \"\",\"userName\": \"\",\"nickName\": \"\",\"avatar\":\"\",\"data\": \"\",\"email\": \"\",\"emailCode\": \"\",\"phone\": \"\",\"phoneCode\": \"\"}" , null , "application/json" );
request . Content = content ;
var response = await client . SendAsync ( request );
response . EnsureSuccessStatusCode ();
Console . WriteLine ( await response . Content . ReadAsStringAsync ());
OkHttpClient client = new OkHttpClient (). newBuilder ()
. build ();
MediaType mediaType = MediaType . parse ( "application/json" );
RequestBody body = RequestBody . create ( mediaType , "{\"pwd\": \"\",\"userName\": \"\",\"nickName\": \"\",\"avatar\": \"\",\"data\": \"\",\"email\": \"\",\"emailCode\": \"\",\"phone\": \"\", \"phoneCode\": \"\"}" );
Request request = new Request . Builder ()
. url ( "https://www.oauthapp.com/api/AppUsers/:appId/SignUp" )
. method ( "POST" , body )
. addHeader ( "Content-Type" , "application/json" )
. build ();
Response response = client . newCall ( request ). execute ();
const axios = require ( 'axios' );
let data = JSON . stringify ({
"pwd" : "" ,
"userName" : "" ,
"nickName" : "" ,
"avatar" : "" ,
"data" : "" ,
"email" : "" ,
"emailCode" : "" ,
"phone" : "" ,
"phoneCode" : ""
});
let config = {
method : 'post' ,
maxBodyLength : Infinity ,
url : 'https://www.oauthapp.com/api/AppUsers/:appId/SignUp' ,
headers : {
'Content-Type' : 'application/json'
},
data : data
};
axios . request ( config )
. then (( response ) => {
console . log ( JSON . stringify ( response . data ));
})
. catch (( error ) => {
console . log ( error );
});
import http.client
import json
conn = http . client . HTTPSConnection ( "www.oauthapp.com" )
payload = json . dumps ({
"pwd" : "" ,
"userName" : "" ,
"nickName" : "" ,
"avatar" : "" ,
"data" : "" ,
"email" : "" ,
"emailCode" : "" ,
"phone" : "" ,
"phoneCode" : ""
})
headers = {
'Content-Type' : 'application/json'
}
conn . request ( "POST" , "/api/AppUsers/:appId/SignUp" , payload , headers )
res = conn . getresponse ()
data = res . read ()
print ( data . decode ( "utf-8" ))
var myHeaders = new Headers ();
myHeaders . append ( "Content-Type" , "application/json" );
var raw = JSON . stringify ({
"pwd" : "" ,
"userName" : "" ,
"nickName" : "" ,
"avatar" : "" ,
"data" : "" ,
"email" : "" ,
"emailCode" : "" ,
"phone" : "" ,
"phoneCode" : ""
});
var requestOptions = {
method : 'POST' ,
headers : myHeaders ,
body : raw ,
redirect : 'follow'
};
fetch ( "https://www.oauthapp.com/api/AppUsers/:appId/SignUp" , requestOptions )
. then ( response => response . text ())
. then ( result => console . log ( result ))
. catch ( error => console . log ( 'error' , error ));
在线调试
手机号
注册
{{serverUrl}} /api/AppUsers/:appId /PhoneSignUp
请求参数 示例 返回数据
说明
请求方式
POST
登陆凭证
不需要
phone
手机号,必填
phoneCode
手机验证码,必填
调用发送手机验证码方法获取
pwd
密码,可空
默认为:123456
email
邮箱,可空
如果应用配置了验证邮箱,则必填
emailCode
邮箱已验证,可空
如果应用配置了验证邮箱,则必填
nickname
昵称,可空
avatar
头像,可空
data
自定义数据,可空
cURL C# Java NodeJs Python Javascript
curl --location 'https://www.oauthapp.com/api/AppUsers/:appId[^2]/PhoneSignUp' \
--header 'Content-Type: application/json' \
--data '{"phone": "","phoneCode": "","pwd": "","email": "","emailCode": "","nickName": "","avatar": "","data": ""}'
var client = new HttpClient ();
var request = new HttpRequestMessage ( HttpMethod . Post , "https://www.oauthapp.com/api/AppUsers/:appId/PhoneSignUp" );
var content = new StringContent ( "{\"phone\": \"\",\"phoneCode\": \"\",\"pwd\": \"\",\"email\": \"\",\"emailCode\": \"\",\"nickName\": \"\",\"avatar\": \"\",\"data\": \"\"}" , null , "application/json" );
request . Content = content ;
var response = await client . SendAsync ( request );
response . EnsureSuccessStatusCode ();
Console . WriteLine ( await response . Content . ReadAsStringAsync ());
OkHttpClient client = new OkHttpClient (). newBuilder (). build ();
MediaType mediaType = MediaType . parse ( "application/json" );
RequestBody body = RequestBody . create ( mediaType , "{\"phone\": \"\",\"phoneCode\": \"\",\"pwd\": \"\",\"email\": \"\",\"emailCode\": \"\",\"nickName\": \"\",\"avatar\": \"\",\"data\": \"\"}" );
Request request = new Request . Builder ()
. url ( "https://www.oauthapp.com/api/AppUsers/:appId/PhoneSignUp" )
. method ( "POST" , body )
. addHeader ( "Content-Type" , "application/json" )
. build ();
Response response = client . newCall ( request ). execute ();
const axios = require ( 'axios' );
let data = JSON . stringify ({
"phone" : "" ,
"phoneCode" : "" ,
"pwd" : "" ,
"email" : "" ,
"emailCode" : "" ,
"nickName" : "" ,
"avatar" : "" ,
"data" : ""
});
let config = {
method : 'post' ,
maxBodyLength : Infinity ,
url : 'https://www.oauthapp.com/api/AppUsers/:appId/PhoneSignUp' ,
headers : {
'Content-Type' : 'application/json'
},
data : data
};
axios . request ( config )
. then (( response ) => {
console . log ( JSON . stringify ( response . data ));
})
. catch (( error ) => {
console . log ( error );
});
import http.client
import json
conn = http . client . HTTPSConnection ( "www.oauthapp.com" )
payload = json . dumps ({
"phone" : "" ,
"phoneCode" : "" ,
"pwd" : "" ,
"email" : "" ,
"emailCode" : "" ,
"nickName" : "" ,
"avatar" : "" ,
"data" : ""
})
headers = {
'Content-Type' : 'application/json'
}
conn . request ( "POST" , "/api/AppUsers/:appId/PhoneSignUp" , payload , headers )
res = conn . getresponse ()
data = res . read ()
print ( data . decode ( "utf-8" ))
var myHeaders = new Headers ();
myHeaders . append ( "Content-Type" , "application/json" );
var raw = JSON . stringify ({
"phone" : "" ,
"phoneCode" : "" ,
"pwd" : "" ,
"email" : "" ,
"emailCode" : "" ,
"nickName" : "" ,
"avatar" : "" ,
"data" : ""
});
var requestOptions = {
method : 'POST' ,
headers : myHeaders ,
body : raw ,
redirect : 'follow'
};
fetch ( "https://www.oauthapp.com/api/AppUsers/:appId/PhoneSignUp" , requestOptions )
. then ( response => response . text ())
. then ( result => console . log ( result ))
. catch ( error => console . log ( 'error' , error ));
在线调试
登录
{{serverUrl}} /api/AppUsers/:appId /PhoneSignIn
请求参数 示例 返回数据
说明
请求方式
POST
登陆凭证
不需要
phone
手机号
verifyCode
手机验证码
cURL C# Java NodeJs Python Javascript
curl --location 'https://www.oauthapp.com/api/AppUsers/:appId[^2]/PhoneSignIn' \
--header 'Content-Type: application/json' \
--data '{
"phone": "",
"verifyCode": ""
}'
var client = new HttpClient ();
var request = new HttpRequestMessage ( HttpMethod . Post , "https://www.oauthapp.com/api/AppUsers/:appId/PhoneSignIn" );
var content = new StringContent ( "{\"phone\": \"\",\"verifyCode\": \"\"}" , null , "application/json" );
request . Content = content ;
var response = await client . SendAsync ( request );
response . EnsureSuccessStatusCode ();
Console . WriteLine ( await response . Content . ReadAsStringAsync ());
OkHttpClient client = new OkHttpClient (). newBuilder (). build ();
MediaType mediaType = MediaType . parse ( "application/json" );
RequestBody body = RequestBody . create ( mediaType , "{\"phone\": \"\",\"verifyCode\": \"\"}" );
Request request = new Request . Builder ()
. url ( "https://www.oauthapp.com/api/AppUsers/:appId/PhoneSignIn" )
. method ( "POST" , body )
. addHeader ( "Content-Type" , "application/json" )
. build ();
Response response = client . newCall ( request ). execute ();
const axios = require ( 'axios' );
let data = JSON . stringify ({
"phone" : "" ,
"verifyCode" : ""
});
let config = {
method : 'post' ,
maxBodyLength : Infinity ,
url : 'https://www.oauthapp.com/api/AppUsers/:appId/PhoneSignIn' ,
headers : {
'Content-Type' : 'application/json'
},
data : data
};
axios . request ( config )
. then (( response ) => {
console . log ( JSON . stringify ( response . data ));
})
. catch (( error ) => {
console . log ( error );
});
import http.client
import json
conn = http . client . HTTPSConnection ( "www.oauthapp.com" )
payload = json . dumps ({
"phone" : "" ,
"verifyCode" : ""
})
headers = {
'Content-Type' : 'application/json'
}
conn . request ( "POST" , "/api/AppUsers/:appId/PhoneSignIn" , payload , headers )
res = conn . getresponse ()
data = res . read ()
print ( data . decode ( "utf-8" ))
var myHeaders = new Headers ();
myHeaders . append ( "Content-Type" , "application/json" );
var raw = JSON . stringify ({
"phone" : "" ,
"verifyCode" : ""
});
var requestOptions = {
method : 'POST' ,
headers : myHeaders ,
body : raw ,
redirect : 'follow'
};
fetch ( "https://www.oauthapp.com/api/AppUsers/:appId/PhoneSignIn" , requestOptions )
. then ( response => response . text ())
. then ( result => console . log ( result ))
. catch ( error => console . log ( 'error' , error ));
在线调试
发送验证码
{{serverUrl}} /api/AppUsers/:appId /SendSMSCode
请求参数 示例 返回数据
说明
请求方式
POST
登陆凭证
不需要
phone
手机号,必填
type
用途,必填
可选值:signup / forgetpwd
cURL C# Java NodeJs Python Javascript
curl --location 'https://www.oauthapp.com/api/AppUsers/:appId[^2]/SendSMSCode' \
--header 'Content-Type: application/json' \
--data '{"phone": "","type": ""}'
var client = new HttpClient ();
var request = new HttpRequestMessage ( HttpMethod . Post , "https://www.oauthapp.com/api/AppUsers/:appId/SendSMSCode" );
var content = new StringContent ( "{\"phone\": \"\",\"type\": \"\"}" , null , "application/json" );
request . Content = content ;
var response = await client . SendAsync ( request );
response . EnsureSuccessStatusCode ();
Console . WriteLine ( await response . Content . ReadAsStringAsync ());
OkHttpClient client = new OkHttpClient (). newBuilder ()
. build ();
MediaType mediaType = MediaType . parse ( "application/json" );
RequestBody body = RequestBody . create ( mediaType , "{\"phone\": \"\",\"type\": \"\"}" );
Request request = new Request . Builder ()
. url ( "https://www.oauthapp.com/api/AppUsers/:appId/SendSMSCode" )
. method ( "POST" , body )
. addHeader ( "Content-Type" , "application/json" )
. build ();
Response response = client . newCall ( request ). execute ();
const axios = require ( 'axios' );
let data = JSON . stringify ({
"phone" : "" ,
"type" : ""
});
let config = {
method : 'post' ,
maxBodyLength : Infinity ,
url : 'https://www.oauthapp.com/api/AppUsers/:appId/SendSMSCode' ,
headers : {
'Content-Type' : 'application/json'
},
data : data
};
axios . request ( config )
. then (( response ) => {
console . log ( JSON . stringify ( response . data ));
})
. catch (( error ) => {
console . log ( error );
});
import http.client
import json
conn = http . client . HTTPSConnection ( "www.oauthapp.com" )
payload = json . dumps ({
"phone" : "" ,
"type" : ""
})
headers = {
'Content-Type' : 'application/json'
}
conn . request ( "POST" , "/api/AppUsers/:appId/SendSMSCode" , payload , headers )
res = conn . getresponse ()
data = res . read ()
print ( data . decode ( "utf-8" ))
var myHeaders = new Headers ();
myHeaders . append ( "Content-Type" , "application/json" );
var raw = JSON . stringify ({
"phone" : "" ,
"type" : ""
});
var requestOptions = {
method : 'POST' ,
headers : myHeaders ,
body : raw ,
redirect : 'follow'
};
fetch ( "https://www.oauthapp.com/api/AppUsers/:appId/SendSMSCode" , requestOptions )
. then ( response => response . text ())
. then ( result => console . log ( result ))
. catch ( error => console . log ( 'error' , error ));
描述
code
表示返回结果的状态码
200 表示成功,非 200 表示失败
data
表示返回的数据
true 或 false
err
错误信息
{
"code" : 200 ,
"data" : true ,
"err" : ""
}
在线调试
邮箱账号
注册
{{serverUrl}} /api/AppUsers/:appId /EmailSignUp
请求参数 示例 返回数据
说明
请求方式
POST
登陆凭证
不需要
email
邮箱,必填
emailCode
邮箱已验证,必填
调用发送邮箱验证码方法获取
pwd
密码,可空
默认为:123456
nickname
昵称,可空
avatar
头像,可空
data
自定义数据,可空
phone
手机号,可空
如果应用配置了验证手机,则必填
phoneCode
手机验证码,可空
如果应用配置了验证手机,则必填
cURL C# Java NodeJs Python Javascript
curl --location 'https://www.oauthapp.com/api/AppUsers/:appId[^2]/EmailSignUp' \
--header 'Content-Type: application/json' \
--data '{"email": "","pwd": "","emailCode": "","phone": "","phoneCode": "","nickName": "","avatar":"","data": ""}'
var client = new HttpClient ();
var request = new HttpRequestMessage ( HttpMethod . Post , "https://www.oauthapp.com/api/AppUsers/:appId/EmailSignUp" );
var content = new StringContent ( "{\"email\": \"\",\"pwd\": \"\",\"emailCode\": \"\",\"phone\": \"\",\"phoneCode\": \"\",\"nickName\": \"\",\"avatar\": \"\",\"data\": \"\"}" , null , "application/json" );
request . Content = content ;
var response = await client . SendAsync ( request );
response . EnsureSuccessStatusCode ();
Console . WriteLine ( await response . Content . ReadAsStringAsync ());
OkHttpClient client = new OkHttpClient (). newBuilder ()
. build ();
MediaType mediaType = MediaType . parse ( "application/json" );
RequestBody body = RequestBody . create ( mediaType , "{\"email\": \"\",\"pwd\": \"\",\"emailCode\": \"\",\"phone\": \"\",\"phoneCode\": \"\",\"nickName\": \"\",\"avatar\": \"\",\"data\": \"\"}" );
Request request = new Request . Builder ()
. url ( "https://www.oauthapp.com/api/AppUsers/:appId/EmailSignUp" )
. method ( "POST" , body )
. addHeader ( "Content-Type" , "application/json" )
. build ();
Response response = client . newCall ( request ). execute ();
const axios = require ( 'axios' );
let data = JSON . stringify ({
"email" : "" ,
"pwd" : "" ,
"emailCode" : "" ,
"phone" : "" ,
"phoneCode" : "" ,
"nickName" : "" ,
"avatar" : "" ,
"data" : ""
});
let config = {
method : 'post' ,
maxBodyLength : Infinity ,
url : 'https://www.oauthapp.com/api/AppUsers/:appId/EmailSignUp' ,
headers : {
'Content-Type' : 'application/json'
},
data : data
};
axios . request ( config )
. then (( response ) => {
console . log ( JSON . stringify ( response . data ));
})
. catch (( error ) => {
console . log ( error );
});
import http.client
import json
conn = http . client . HTTPSConnection ( "www.oauthapp.com" )
payload = json . dumps ({
"email" : "" ,
"pwd" : "" ,
"emailCode" : "" ,
"phone" : "" ,
"phoneCode" : "" ,
"nickName" : "" ,
"avatar" : "" ,
"data" : ""
})
headers = {
'Content-Type' : 'application/json'
}
conn . request ( "POST" , "/api/AppUsers/:appId/EmailSignUp" , payload , headers )
res = conn . getresponse ()
data = res . read ()
print ( data . decode ( "utf-8" ))
var myHeaders = new Headers ();
myHeaders . append ( "Content-Type" , "application/json" );
var raw = JSON . stringify ({
"email" : "" ,
"pwd" : "" ,
"emailCode" : "" ,
"phone" : "" ,
"phoneCode" : "" ,
"nickName" : "" ,
"avatar" : "" ,
"data" : ""
});
var requestOptions = {
method : 'POST' ,
headers : myHeaders ,
body : raw ,
redirect : 'follow'
};
fetch ( "https://www.oauthapp.com/api/AppUsers/:appId/EmailSignUp" , requestOptions )
. then ( response => response . text ())
. then ( result => console . log ( result ))
. catch ( error => console . log ( 'error' , error ));
在线调试
登录
{{serverUrl}} /api/AppUsers/:appId /EmailSignIn
请求参数 示例 返回数据
说明
请求方式
POST
登陆凭证
不需要
email
邮箱,必填
emailCode
邮箱验证码,必填
调用发送邮箱验证码方法获取
cURL C# Java NodeJs Python Javascript
curl --location 'https://www.oauthapp.com/api/AppUsers/:appId/EmailSignIn' \
--header 'Content-Type: application/json' \
--data '{"email": "","verifyCode": ""}'
var client = new HttpClient ();
var request = new HttpRequestMessage ( HttpMethod . Post , "https://www.oauthapp.com/api/AppUsers/:appId/EmailSignIn" );
var content = new StringContent ( "{\"email\": \"\",\"verifyCode\": \"\"}" , null , "application/json" );
request . Content = content ;
var response = await client . SendAsync ( request );
response . EnsureSuccessStatusCode ();
Console . WriteLine ( await response . Content . ReadAsStringAsync ());
OkHttpClient client = new OkHttpClient (). newBuilder ()
. build ();
MediaType mediaType = MediaType . parse ( "application/json" );
RequestBody body = RequestBody . create ( mediaType , "{\"email\": \"\",\"verifyCode\": \"\"}" );
Request request = new Request . Builder ()
. url ( "https://www.oauthapp.com/api/AppUsers/:appId/EmailSignIn" )
. method ( "POST" , body )
. addHeader ( "Content-Type" , "application/json" )
. build ();
Response response = client . newCall ( request ). execute ();
const axios = require ( 'axios' );
let data = JSON . stringify ({
"email" : "" ,
"verifyCode" : ""
});
let config = {
method : 'post' ,
maxBodyLength : Infinity ,
url : 'https://www.oauthapp.com/api/AppUsers/:appId/EmailSignIn' ,
headers : {
'Content-Type' : 'application/json'
},
data : data
};
axios . request ( config )
. then (( response ) => {
console . log ( JSON . stringify ( response . data ));
})
. catch (( error ) => {
console . log ( error );
});
import http.client
import json
conn = http . client . HTTPSConnection ( "www.oauthapp.com" )
payload = json . dumps ({
"email" : "" ,
"verifyCode" : ""
})
headers = {
'Content-Type' : 'application/json'
}
conn . request ( "POST" , "/api/AppUsers/:appId/EmailSignIn" , payload , headers )
res = conn . getresponse ()
data = res . read ()
print ( data . decode ( "utf-8" ))
var myHeaders = new Headers ();
myHeaders . append ( "Content-Type" , "application/json" );
var raw = JSON . stringify ({
"email" : "" ,
"verifyCode" : ""
});
var requestOptions = {
method : 'POST' ,
headers : myHeaders ,
body : raw ,
redirect : 'follow'
};
fetch ( "https://www.oauthapp.com/api/AppUsers/:appId/EmailSignIn" , requestOptions )
. then ( response => response . text ())
. then ( result => console . log ( result ))
. catch ( error => console . log ( 'error' , error ));
在线调试
发送验证码
{{serverUrl}} /api/AppUsers/:appId /SendEmailCode
请求参数 示例 返回数据
说明
请求方式
POST
登陆凭证
不需要
email
邮箱,必填
type
用途,必填
可选值:signup / forgetpwd
cURL C# Java NodeJs Python Javascript
curl --location 'https://www.oauthapp.com/api/AppUsers/:appId/SendEmailCode' \
--header 'Content-Type: application/json' \
--data '{"email": "","type": ""}'
var client = new HttpClient ();
var request = new HttpRequestMessage ( HttpMethod . Post , "https://www.oauthapp.com/api/AppUsers/:appId/SendEmailCode" );
var content = new StringContent ( "{\"email\": \"\",\"type\": \"\"}" , null , "application/json" );
request . Content = content ;
var response = await client . SendAsync ( request );
response . EnsureSuccessStatusCode ();
Console . WriteLine ( await response . Content . ReadAsStringAsync ());
OkHttpClient client = new OkHttpClient (). newBuilder ()
. build ();
MediaType mediaType = MediaType . parse ( "application/json" );
RequestBody body = RequestBody . create ( mediaType , "{\"email\": \"\",\"type\": \"\"}" );
Request request = new Request . Builder ()
. url ( "https://www.oauthapp.com/api/AppUsers/:appId/SendEmailCode" )
. method ( "POST" , body )
. addHeader ( "Content-Type" , "application/json" )
. build ();
Response response = client . newCall ( request ). execute ();
const axios = require ( 'axios' );
let data = JSON . stringify ({
"email" : "" ,
"type" : ""
});
let config = {
method : 'post' ,
maxBodyLength : Infinity ,
url : 'https://www.oauthapp.com/api/AppUsers/:appId/SendEmailCode' ,
headers : {
'Content-Type' : 'application/json'
},
data : data
};
axios . request ( config )
. then (( response ) => {
console . log ( JSON . stringify ( response . data ));
})
. catch (( error ) => {
console . log ( error );
});
import http.client
import json
conn = http . client . HTTPSConnection ( "www.oauthapp.com" )
payload = json . dumps ({
"email" : "" ,
"type" : ""
})
headers = {
'Content-Type' : 'application/json'
}
conn . request ( "POST" , "/api/AppUsers/:appId/SendEmailCode" , payload , headers )
res = conn . getresponse ()
data = res . read ()
print ( data . decode ( "utf-8" ))
var myHeaders = new Headers ();
myHeaders . append ( "Content-Type" , "application/json" );
var raw = JSON . stringify ({
"email" : "" ,
"type" : ""
});
var requestOptions = {
method : 'POST' ,
headers : myHeaders ,
body : raw ,
redirect : 'follow'
};
fetch ( "https://www.oauthapp.com/api/AppUsers/:appId/SendEmailCode" , requestOptions )
. then ( response => response . text ())
. then ( result => console . log ( result ))
. catch ( error => console . log ( 'error' , error ));
描述
code
表示返回结果的状态码
200 表示成功,非 200 表示失败
data
表示返回的数据
true 或 false
err
错误信息
{
"code" : 200 ,
"data" : true ,
"err" : ""
}
在线调试
重置密码
{{serverUrl}} /api/AppUsers/:appId /ResetPwd
请求参数 示例 返回数据
说明
请求方式
POST
登陆凭证
不需要
phone
手机号
手机号、邮箱账号必选一种
email
邮箱账号
手机号、邮箱账号必选一种
code
验证码,必填
手机号或邮箱账号收到的验证码
pwd
新的密码,必填
cURL C# Java NodeJs Python Javascript
curl --location 'https://www.oauthapp.com/api/AppUsers/:appId/ResetPwd' \
--header 'Content-Type: application/json' \
--data '{"code": "","pwd": "","phone": "","email": ""}'
var client = new HttpClient ();
var request = new HttpRequestMessage ( HttpMethod . Post , "https://www.oauthapp.com/api/AppUsers/:appId/ResetPwd" );
var content = new StringContent ( "{\"code\": \"\",\"pwd\": \"\",\"phone\": \"\",\"email\": \"\"}" , null , "application/json" );
request . Content = content ;
var response = await client . SendAsync ( request );
response . EnsureSuccessStatusCode ();
Console . WriteLine ( await response . Content . ReadAsStringAsync ());
OkHttpClient client = new OkHttpClient (). newBuilder ()
. build ();
MediaType mediaType = MediaType . parse ( "application/json" );
RequestBody body = RequestBody . create ( mediaType , "{\"code\": \"\",\"pwd\": \"\",\"phone\": \"\",\"email\": \"\"}" );
Request request = new Request . Builder ()
. url ( "https://www.oauthapp.com/api/AppUsers/:appId/ResetPwd" )
. method ( "POST" , body )
. addHeader ( "Content-Type" , "application/json" )
. build ();
Response response = client . newCall ( request ). execute ();
const axios = require ( 'axios' );
let data = JSON . stringify ({
"code" : "" ,
"pwd" : "" ,
"phone" : "" ,
"email" : ""
});
let config = {
method : 'post' ,
maxBodyLength : Infinity ,
url : 'https://www.oauthapp.com/api/AppUsers/:appId/ResetPwd' ,
headers : {
'Content-Type' : 'application/json'
},
data : data
};
axios . request ( config )
. then (( response ) => {
console . log ( JSON . stringify ( response . data ));
})
. catch (( error ) => {
console . log ( error );
});
import http.client
import json
conn = http . client . HTTPSConnection ( "www.oauthapp.com" )
payload = json . dumps ({
"code" : "" ,
"pwd" : "" ,
"phone" : "" ,
"email" : ""
})
headers = {
'Content-Type' : 'application/json'
}
conn . request ( "POST" , "/api/AppUsers/:appId/ResetPwd" , payload , headers )
res = conn . getresponse ()
data = res . read ()
print ( data . decode ( "utf-8" ))
var myHeaders = new Headers ();
myHeaders . append ( "Content-Type" , "application/json" );
var raw = JSON . stringify ({
"code" : "" ,
"pwd" : "" ,
"phone" : "" ,
"email" : ""
});
var requestOptions = {
method : 'POST' ,
headers : myHeaders ,
body : raw ,
redirect : 'follow'
};
fetch ( "https://www.oauthapp.com/api/AppUsers/:appId/ResetPwd" , requestOptions )
. then ( response => response . text ())
. then ( result => console . log ( result ))
. catch ( error => console . log ( 'error' , error ));
描述
code
表示返回结果的状态码
200 表示成功,非 200 表示失败
data
表示返回的数据
true 或 false
err
错误信息
{
"code" : 200 ,
"data" : true ,
"err" : ""
}
在线调试
微信小程序
网页端
获取预登录SignKey
{{serverUrl}} /api/AppUsers/:appId /QRCodePreSignIn
请求参数 示例 返回数据
说明
请求方式
POST
登陆凭证
不需要
scheme
身份验证协议
固定填:app
scopes
需要微信小程序用户授权的列表,用英文空格分隔
openid phone
remark
自定义备注信息
cURL C# Java NodeJs Python JavaScript
curl --location 'https://www.oauthapp.com/api/AppUsers/:appId/QRCodePreSignIn' \
--header 'Content-Type: application/json' \
--data '{"scopes": "","remark": "","scheme": "app"}'
var client = new HttpClient ();
var request = new HttpRequestMessage ( HttpMethod . Post , "https://www.oauthapp.com/api/AppUsers/:appId/QRCodePreSignIn" );
var content = new StringContent ( "{\"scopes\": \"\",\"remark\": \"\",\"scheme\": \"app\"}" , null , "application/json" );
request . Content = content ;
var response = await client . SendAsync ( request );
response . EnsureSuccessStatusCode ();
Console . WriteLine ( await response . Content . ReadAsStringAsync ());
OkHttpClient client = new OkHttpClient (). newBuilder ()
. build ();
MediaType mediaType = MediaType . parse ( "application/json" );
RequestBody body = RequestBody . create ( mediaType , "{\"scopes\": \"\",\"remark\": \"\",\"scheme\":\"app\"}" );
Request request = new Request . Builder ()
. url ( "https://www.oauthapp.com/api/AppUsers/:appId/QRCodePreSignIn" )
. method ( "POST" , body )
. addHeader ( "Content-Type" , "application/json" )
. build ();
Response response = client . newCall ( request ). execute ();
const axios = require ( 'axios' );
let data = JSON . stringify ({
"scopes" : "" ,
"remark" : "" ,
"scheme" : "app"
});
let config = {
method : 'post' ,
maxBodyLength : Infinity ,
url : 'https://www.oauthapp.com/api/AppUsers/:appId/QRCodePreSignIn' ,
headers : {
'Content-Type' : 'application/json'
},
data : data
};
axios . request ( config )
. then (( response ) => {
console . log ( JSON . stringify ( response . data ));
})
. catch (( error ) => {
console . log ( error );
});
import http.client
import json
conn = http . client . HTTPSConnection ( "www.oauthapp.com" )
payload = json . dumps ({
"scopes" : "" ,
"remark" : "" ,
"scheme" : "app"
})
headers = {
'Content-Type' : 'application/json'
}
conn . request ( "POST" , "/api/AppUsers/:appId/QRCodePreSignIn" , payload , headers )
res = conn . getresponse ()
data = res . read ()
print ( data . decode ( "utf-8" ))
var myHeaders = new Headers ();
myHeaders . append ( "Content-Type" , "application/json" );
var raw = JSON . stringify ({
"scopes" : "" ,
"remark" : "" ,
"scheme" : "app"
});
var requestOptions = {
method : 'POST' ,
headers : myHeaders ,
body : raw ,
redirect : 'follow'
};
fetch ( "https://www.oauthapp.com/api/AppUsers/:appId/QRCodePreSignIn" , requestOptions )
. then ( response => response . text ())
. then ( result => console . log ( result ))
. catch ( error => console . log ( 'error' , error ));
说明
code
表示返回结果的状态码
200 表示成功,非 200 表示失败
err
错误信息
data
表示返回的数据
signInKey
{
"code" : 200 ,
"data" : 19 ,
"err" : ""
}
在线调试
登录结果查询
{{serverUrl}} /api/AppUsers/:appId /QRCodeSignIn
请求参数 示例 返回数据
说明
请求方式
POST
登陆凭证
不需要
signInKey
小程序登录查询凭证
cURL C# Java NodeJs Python JavaScript
curl --location 'https://www.oauthapp.com/api/AppUsers/:appId/QRCodeSignIn' \
--header 'Content-Type: application/json' \
--data '{"signInKey": ""}'
var client = new HttpClient ();
var request = new HttpRequestMessage ( HttpMethod . Post , "https://www.oauthapp.com/api/AppUsers/:appId/QRCodeSignIn" );
var content = new StringContent ( "{\"signInKey\": \"\"}" , null , "application/json" );
request . Content = content ;
var response = await client . SendAsync ( request );
response . EnsureSuccessStatusCode ();
Console . WriteLine ( await response . Content . ReadAsStringAsync ());
OkHttpClient client = new OkHttpClient (). newBuilder ()
. build ();
MediaType mediaType = MediaType . parse ( "application/json" );
RequestBody body = RequestBody . create ( mediaType , "{\"signInKey\": \"\"}" );
Request request = new Request . Builder ()
. url ( "https://www.oauthapp.com/api/AppUsers/:appId/QRCodeSignIn" )
. method ( "POST" , body )
. addHeader ( "Content-Type" , "application/json" )
. build ();
Response response = client . newCall ( request ). execute ();
const axios = require ( 'axios' );
let data = JSON . stringify ({
"signInKey" : ""
});
let config = {
method : 'post' ,
maxBodyLength : Infinity ,
url : 'https://www.oauthapp.com/api/AppUsers/:appId/QRCodeSignIn' ,
headers : {
'Content-Type' : 'application/json'
},
data : data
};
axios . request ( config )
. then (( response ) => {
console . log ( JSON . stringify ( response . data ));
})
. catch (( error ) => {
console . log ( error );
});
import http.client
import json
conn = http . client . HTTPSConnection ( "www.oauthapp.com" )
payload = json . dumps ({
"signInKey" : ""
})
headers = {
'Content-Type' : 'application/json'
}
conn . request ( "POST" , "/api/AppUsers/:appId/QRCodeSignIn" , payload , headers )
res = conn . getresponse ()
data = res . read ()
print ( data . decode ( "utf-8" ))
var myHeaders = new Headers ();
myHeaders . append ( "Content-Type" , "application/json" );
var raw = JSON . stringify ({
"signInKey" : ""
});
var requestOptions = {
method : 'POST' ,
headers : myHeaders ,
body : raw ,
redirect : 'follow'
};
fetch ( "https://www.oauthapp.com/api/AppUsers/:appId/QRCodeSignIn" , requestOptions )
. then ( response => response . text ())
. then ( result => console . log ( result ))
. catch ( error => console . log ( 'error' , error ));
在线调试
小程序端
确认扫码成功
{{serverUrl}} /api/AppUsers/:appId /QRCodeScan
请求参数 示例 返回数据
说明
请求方式
POST
登陆凭证
不需要
signInKey
小程序登录查询凭证
cURL C# Java NodeJs Python JavaScript
curl --location 'https://www.oauthapp.com/api/AppUsers/:appId/QRCodeScan' \
--header 'Content-Type: application/json' \
--data '{"signInKey": ""}'
var client = new HttpClient ();
var request = new HttpRequestMessage ( HttpMethod . Post , "https://www.oauthapp.com/api/AppUsers/:appId/QRCodeScan" );
var content = new StringContent ( "{\"signInKey\": \"\"}" , null , "application/json" );
request . Content = content ;
var response = await client . SendAsync ( request );
response . EnsureSuccessStatusCode ();
Console . WriteLine ( await response . Content . ReadAsStringAsync ());
OkHttpClient client = new OkHttpClient (). newBuilder ()
. build ();
MediaType mediaType = MediaType . parse ( "application/json" );
RequestBody body = RequestBody . create ( mediaType , "{\"signInKey\": \"\"}" );
Request request = new Request . Builder ()
. url ( "https://www.oauthapp.com/api/AppUsers/:appId/QRCodeScan" )
. method ( "POST" , body )
. addHeader ( "Content-Type" , "application/json" )
. build ();
Response response = client . newCall ( request ). execute ();
const axios = require ( 'axios' );
let data = JSON . stringify ({
"signInKey" : ""
});
let config = {
method : 'post' ,
maxBodyLength : Infinity ,
url : 'https://www.oauthapp.com/api/AppUsers/:appId/QRCodeScan' ,
headers : {
'Content-Type' : 'application/json'
},
data : data
};
axios . request ( config )
. then (( response ) => {
console . log ( JSON . stringify ( response . data ));
})
. catch (( error ) => {
console . log ( error );
});
import http.client
import json
conn = http . client . HTTPSConnection ( "www.oauthapp.com" )
payload = json . dumps ({
"signInKey" : ""
})
headers = {
'Content-Type' : 'application/json'
}
conn . request ( "POST" , "/api/AppUsers/:appId/QRCodeScan" , payload , headers )
res = conn . getresponse ()
data = res . read ()
print ( data . decode ( "utf-8" ))
var myHeaders = new Headers ();
myHeaders . append ( "Content-Type" , "application/json" );
var raw = JSON . stringify ({
"signInKey" : ""
});
var requestOptions = {
method : 'POST' ,
headers : myHeaders ,
body : raw ,
redirect : 'follow'
};
fetch ( "https://www.oauthapp.com/api/AppUsers/:appId/QRCodeScan" , requestOptions )
. then ( response => response . text ())
. then ( result => console . log ( result ))
. catch ( error => console . log ( 'error' , error ));
说明
code
表示返回结果的状态码
200 表示成功,非 200 表示失败
data
表示返回的数据
具体包含appID、name、logo、website、description、tags、scopes、remark 和 scheme
err
错误信息
{
"code" : 200 ,
"data" : {
"appID" : 2 ,
"name" : "开发文档" ,
"logo" : "https://blob.oauthapp.com/4/tenant/2/API.png" ,
"website" : "https://web.oauthapp.com/4/docs" ,
"description" : null ,
"tags" : null ,
"scopes" : "openid profile role promission" ,
"remark" : "test" ,
"scheme" : "app"
},
"err" : ""
}
在线调试
注册
{{serverUrl}} /api/AppUsers/:appId /QRCodeSignUp
请求参数 示例 返回数据
说明
请求方式
POST
登陆凭证
不需要
unionId
微信小程序用户的unionId/openid
pwd
密码,可空
默认为:123456
nickname
昵称,可空
avatar
头像,可空
data
自定义数据,可空
phone
手机号,可空
如果应用配置了验证手机,则必填
phoneCode
手机验证码,可空
如果应用配置了验证手机,则必填
email
邮箱,可空
如果应用配置了验证邮箱,则必填
emailCode
邮箱已验证,可空
如果应用配置了验证邮箱,则必填
cURL C# Java NodeJs Python JavaScript
curl --location 'https://www.oauthapp.com/api/AppUsers/:appId/QRCodeSignUp' \
--header 'Content-Type: application/json' \
--data '{"unionID": "","signInKey": "","nickName": "","avatar": "","data": "","email": "", "emailCode": "","phone": "","phoneCode": ""}'
var client = new HttpClient ();
var request = new HttpRequestMessage ( HttpMethod . Post , "https://www.oauthapp.com/api/AppUsers/:appId/QRCodeSignUp" );
var content = new StringContent ( "{\"unionID\": \"\",\"signInKey\": \"\",\"nickName\": \"\",\"avatar\": \"\",\"data\": \"\",\"email\": \"\",\"emailCode\": \"\",\"phone\": \"\",\"phoneCode\":\"\"}" , null , "application/json" );
request . Content = content ;
var response = await client . SendAsync ( request );
response . EnsureSuccessStatusCode ();
Console . WriteLine ( await response . Content . ReadAsStringAsync ());
OkHttpClient client = new OkHttpClient (). newBuilder ()
. build ();
MediaType mediaType = MediaType . parse ( "application/json" );
RequestBody body = RequestBody . create ( mediaType , "{\"unionID\": \"\",\"signInKey\": \"\",\"nickName\": \"\",\"avatar\": \"\",\"data\": \"\",\"email\": \"\",\"emailCode\": \"\",\"phone\":\"\",\"phoneCode\": \"\"}" );
Request request = new Request . Builder ()
. url ( "https://www.oauthapp.com/api/AppUsers/:appId/QRCodeSignUp" )
. method ( "POST" , body )
. addHeader ( "Content-Type" , "application/json" )
. build ();
Response response = client . newCall ( request ). execute ();
const axios = require ( 'axios' );
let data = JSON . stringify ({
"unionID" : "" ,
"signInKey" : "" ,
"nickName" : "" ,
"avatar" : "" ,
"data" : "" ,
"email" : "" ,
"emailCode" : "" ,
"phone" : "" ,
"phoneCode" : ""
});
let config = {
method : 'post' ,
maxBodyLength : Infinity ,
url : 'https://www.oauthapp.com/api/AppUsers/:appId/QRCodeSignUp' ,
headers : {
'Content-Type' : 'application/json'
},
data : data
};
axios . request ( config )
. then (( response ) => {
console . log ( JSON . stringify ( response . data ));
})
. catch (( error ) => {
console . log ( error );
});
import http.client
import json
conn = http . client . HTTPSConnection ( "www.oauthapp.com" )
payload = json . dumps ({
"unionID" : "" ,
"signInKey" : "" ,
"nickName" : "" ,
"avatar" : "" ,
"data" : "" ,
"email" : "" ,
"emailCode" : "" ,
"phone" : "" ,
"phoneCode" : ""
})
headers = {
'Content-Type' : 'application/json'
}
conn . request ( "POST" , "/api/AppUsers/:appId/QRCodeSignUp" , payload , headers )
res = conn . getresponse ()
data = res . read ()
print ( data . decode ( "utf-8" ))
var myHeaders = new Headers ();
myHeaders . append ( "Content-Type" , "application/json" );
var raw = JSON . stringify ({
"unionID" : "" ,
"signInKey" : "" ,
"nickName" : "" ,
"avatar" : "" ,
"data" : "" ,
"email" : "" ,
"emailCode" : "" ,
"phone" : "" ,
"phoneCode" : ""
});
var requestOptions = {
method : 'POST' ,
headers : myHeaders ,
body : raw ,
redirect : 'follow'
};
fetch ( "https://www.oauthapp.com/api/AppUsers/:appId/QRCodeSignUp" , requestOptions )
. then ( response => response . text ())
. then ( result => console . log ( result ))
. catch ( error => console . log ( 'error' , error ));
在线调试
开放认证
申请授权码
{{serverUrl}} /api/OAuth/:appId /GrantCode?scheme=
请求参数 示例 返回数据
参数
说明
请求方式
POST
登陆凭证
不需要
scheme
身份验证协议
固定填:app
redirect_uri
返回地址,必填
默认无限制,也可在【安全-开放认证网址白名单】配置
grant_type
授权类型,必填
可选:email、phone、unionid、account
scopes
自定义授权范围,必填
用英文空格分隔
userName
用户名
授权类型为:email/phone/account必填
password
登录密码
授权类型为:email/phone/account必填
unionId
unionId
授权类型为:unionid必填
platform
平台
授权类型为:unionid必填
expireInDays
授权有效期(天)
默认为1,取值范围:1~99
cURL C# Java NodeJs Python Javascript
curl --location 'https://www.oauthapp.com/api/OAuth/:appId/GrantCode?scheme=app' \
--header 'Content-Type: application/json' \
--data '{"grant_type": "","scopes": "","redirect_uri": "","userName": "","password": "","unionId":"","platform": "","expireInDays": 1}'
var client = new HttpClient ();
var request = new HttpRequestMessage ( HttpMethod . Post , "https://www.oauthapp.com/api/OAuth/:appId/GrantCode?scheme=app" );
var content = new StringContent ( "{\"grant_type\": \"\",\"scopes\": \"\",\"redirect_uri\": \"\",\"userName\": \"\",\"password\": \"\",\"unionId\": \"\",\"platform\": \"\",\"expireInDays\": 1}" , null , "application/json" );
request . Content = content ;
var response = await client . SendAsync ( request );
response . EnsureSuccessStatusCode ();
Console . WriteLine ( await response . Content . ReadAsStringAsync ());
OkHttpClient client = new OkHttpClient (). newBuilder ()
. build ();
MediaType mediaType = MediaType . parse ( "application/json" );
RequestBody body = RequestBody . create ( mediaType , "{\"grant_type\": \"\",\"scopes\": \"\",\"redirect_uri\": \"\",\"userName\": \"\",\"password\": \"\",\"unionId\": \"\",\"platform\": \"\",\"expireInDays\": 1}" );
Request request = new Request . Builder ()
. url ( "https://www.oauthapp.com/api/OAuth/:appId/GrantCode?scheme=app" )
. method ( "POST" , body )
. addHeader ( "Content-Type" , "application/json" )
. build ();
Response response = client . newCall ( request ). execute ();
const axios = require ( 'axios' );
let data = JSON . stringify ({
"grant_type" : "" ,
"scopes" : "" ,
"redirect_uri" : "" ,
"userName" : "" ,
"password" : "" ,
"unionId" : "" ,
"platform" : "" ,
"expireInDays" : 1
});
let config = {
method : 'post' ,
maxBodyLength : Infinity ,
url : 'https://www.oauthapp.com/api/OAuth/:appId/GrantCode?scheme=app' ,
headers : {
'Content-Type' : 'application/json'
},
data : data
};
axios . request ( config )
. then (( response ) => {
console . log ( JSON . stringify ( response . data ));
})
. catch (( error ) => {
console . log ( error );
});
import http.client
import json
conn = http . client . HTTPSConnection ( "www.oauthapp.com" )
payload = json . dumps ({
"grant_type" : "" ,
"scopes" : "" ,
"redirect_uri" : "" ,
"userName" : "" ,
"password" : "" ,
"unionId" : "" ,
"platform" : "" ,
"expireInDays" : 1
})
headers = {
'Content-Type' : 'application/json'
}
conn . request ( "POST" , "/api/OAuth/:appId/GrantCode?scheme=app" , payload , headers )
res = conn . getresponse ()
data = res . read ()
print ( data . decode ( "utf-8" ))
var myHeaders = new Headers ();
myHeaders . append ( "Content-Type" , "application/json" );
var raw = JSON . stringify ({
"grant_type" : "" ,
"scopes" : "" ,
"redirect_uri" : "" ,
"userName" : "" ,
"password" : "" ,
"unionId" : "" ,
"platform" : "" ,
"expireInDays" : 1
});
var requestOptions = {
method : 'POST' ,
headers : myHeaders ,
body : raw ,
redirect : 'follow'
};
fetch ( "https://www.oauthapp.com/api/OAuth/:appId/GrantCode?scheme=app" , requestOptions )
. then ( response => response . text ())
. then ( result => console . log ( result ))
. catch ( error => console . log ( 'error' , error ));
描述
code
表示返回结果的状态码
200 表示成功,非 200 表示失败
err
错误信息
data
表示返回的数据
code:授权码、expires_in:有效时间(秒)
{
"code" : 200 ,
"data" : {
"code" : "e663f9e958ab40d39ad08cfe175b6800" ,
"expires_in" : 120
},
"err" : ""
}
在线调试
获取access_token
{{serverUrl}} /api/OAuth/:appId /Authorize?scheme=&code=
请求参数 示例 返回数据
参数
说明
请求方式
POST
登陆凭证
不需要
scheme
身份验证协议
固定填:app
code
授权码
cURL C# Java NodeJs Python Javascript
curl --location --request POST 'https://www.oauthapp.com/api/OAuth/:appId/Authorize?scheme=&code='
var client = new HttpClient ();
var request = new HttpRequestMessage ( HttpMethod . Post , "https://www.oauthapp.com/api/OAuth/:appId/Authorize?scheme=&code=" );
var response = await client . SendAsync ( request );
response . EnsureSuccessStatusCode ();
Console . WriteLine ( await response . Content . ReadAsStringAsync ());
OkHttpClient client = new OkHttpClient (). newBuilder ()
. build ();
MediaType mediaType = MediaType . parse ( "text/plain" );
RequestBody body = RequestBody . create ( mediaType , "" );
Request request = new Request . Builder ()
. url ( "https://www.oauthapp.com/api/OAuth/:appId/Authorize?scheme=&code=" )
. method ( "POST" , body )
. build ();
Response response = client . newCall ( request ). execute ();
const axios = require ( 'axios' );
let config = {
method : 'post' ,
maxBodyLength : Infinity ,
url : 'https://www.oauthapp.com/api/OAuth/:appId/Authorize?scheme=&code='
};
axios . request ( config )
. then (( response ) => {
console . log ( JSON . stringify ( response . data ));
})
. catch (( error ) => {
console . log ( error );
});
import http.client
conn = http . client . HTTPSConnection ( "www.oauthapp.com" )
payload = ''
headers = {}
conn . request ( "POST" , "/api/OAuth/:appId/Authorize?scheme=&code=" , payload , headers )
res = conn . getresponse ()
data = res . read ()
print ( data . decode ( "utf-8" ))
var myHeaders = new Headers ();
var requestOptions = {
method : 'POST' ,
headers : myHeaders ,
redirect : 'follow'
};
fetch ( "https://www.oauthapp.com/api/OAuth/:appId/Authorize?scheme=&code=" , requestOptions )
. then ( response => response . text ())
. then ( result => console . log ( result ))
. catch ( error => console . log ( 'error' , error ));
在线调试
授权记录
{{serverUrl}} /api/OAuth/:appId /Consents
请求参数 示例 返回数据
参数
说明
请求方式
GET
登陆凭证
Bearer Token
cURL C# Java NodeJs Python Javascript
curl --location 'https://www.oauthapp.com/api/OAuth/:appId/Consents' \
--header 'Authorization: Bearer {{access_token}}'
var client = new HttpClient ();
var request = new HttpRequestMessage ( HttpMethod . Get , "https://www.oauthapp.com/api/OAuth/:appId/Consents" );
request . Headers . Add ( "Authorization" , "Bearer {{access_token}}" );
var response = await client . SendAsync ( request );
response . EnsureSuccessStatusCode ();
Console . WriteLine ( await response . Content . ReadAsStringAsync ());
OkHttpClient client = new OkHttpClient (). newBuilder ()
. build ();
MediaType mediaType = MediaType . parse ( "text/plain" );
RequestBody body = RequestBody . create ( mediaType , "" );
Request request = new Request . Builder ()
. url ( "https://www.oauthapp.com/api/OAuth/:appId/Consents" )
. method ( "GET" , body )
. addHeader ( "Authorization" , "Bearer {{access_token}}" )
. build ();
Response response = client . newCall ( request ). execute ();
const axios = require ( 'axios' );
let config = {
method : 'get' ,
maxBodyLength : Infinity ,
url : 'https://www.oauthapp.com/api/OAuth/:appId/Consents' ,
headers : {
'Authorization' : 'Bearer {{access_token}}'
}
};
axios . request ( config )
. then (( response ) => {
console . log ( JSON . stringify ( response . data ));
})
. catch (( error ) => {
console . log ( error );
});
import http.client
conn = http . client . HTTPSConnection ( "www.oauthapp.com" )
payload = ''
headers = {
'Authorization' : 'Bearer {{access_token}}'
}
conn . request ( "GET" , "/api/OAuth/:appId/Consents" , payload , headers )
res = conn . getresponse ()
data = res . read ()
print ( data . decode ( "utf-8" ))
var myHeaders = new Headers ();
myHeaders . append ( "Authorization" , "Bearer {{access_token}}" );
var requestOptions = {
method : 'GET' ,
headers : myHeaders ,
redirect : 'follow'
};
fetch ( "https://www.oauthapp.com/api/OAuth/:appId/Consents" , requestOptions )
. then ( response => response . text ())
. then ( result => console . log ( result ))
. catch ( error => console . log ( 'error' , error ));
描述
code
表示返回结果的状态码
200 表示成功,非 200 表示失败
err
错误信息
data
表示返回的数据
{
"code" : 200 ,
"data" : [
{
"id" : 9 ,
"createDate" : "2023-07-24 13:33:26" ,
"lastUpdate" : "2023-07-24 13:33:26" ,
"grantType" : "unionid" ,
"redirectUri" : "" ,
"remark" : null ,
"scopes" : "openid"
}
],
"err" : ""
}
在线调试
删除授权记录
{{serverUrl}} /api/OAuth/:appId /Consents/:id
请求参数 示例 返回数据
参数
说明
请求方式
DELETE
登陆凭证
bearerToken
id
授权记录的ID
cURL C# Java NodeJs Python Javascript
curl --location --request DELETE 'https://www.oauthapp.com/api/OAuth/:appId/Consents/:id' \
--header 'Authorization: Bearer {{bearerToken}}'
var client = new HttpClient ();
var request = new HttpRequestMessage ( HttpMethod . Delete , "https://www.oauthapp.com/api/OAuth/:appId/Consents/:id" );
request . Headers . Add ( "Authorization" , "Bearer {{access_token}}" );
var response = await client . SendAsync ( request );
response . EnsureSuccessStatusCode ();
Console . WriteLine ( await response . Content . ReadAsStringAsync ());
OkHttpClient client = new OkHttpClient (). newBuilder ()
. build ();
MediaType mediaType = MediaType . parse ( "text/plain" );
RequestBody body = RequestBody . create ( mediaType , "" );
Request request = new Request . Builder ()
. url ( "https://www.oauthapp.com/api/OAuth/:appId/Consents/:id" )
. method ( "DELETE" , body )
. addHeader ( "Authorization" , "Bearer {{access_token}}" )
. build ();
Response response = client . newCall ( request ). execute ();
const axios = require ( 'axios' );
let config = {
method : 'delete' ,
maxBodyLength : Infinity ,
url : 'https://www.oauthapp.com/api/OAuth/:appId/Consents/:id' ,
headers : {
'Authorization' : 'Bearer {{access_token}}'
}
};
axios . request ( config )
. then (( response ) => {
console . log ( JSON . stringify ( response . data ));
})
. catch (( error ) => {
console . log ( error );
});
import http.client
conn = http . client . HTTPSConnection ( "www.oauthapp.com" )
payload = ''
headers = {
'Authorization' : 'Bearer {{access_token}}'
}
conn . request ( "DELETE" , "/api/OAuth/:appId/Consents/:id" , payload , headers )
res = conn . getresponse ()
data = res . read ()
print ( data . decode ( "utf-8" ))
var myHeaders = new Headers ();
myHeaders . append ( "Authorization" , "Bearer {{access_token}}" );
var requestOptions = {
method : 'DELETE' ,
headers : myHeaders ,
redirect : 'follow'
};
fetch ( "https://www.oauthapp.com/api/OAuth/:appId/Consents/:id" , requestOptions )
. then ( response => response . text ())
. then ( result => console . log ( result ))
. catch ( error => console . log ( 'error' , error ));
描述
code
表示返回结果的状态码
200 表示成功,非 200 表示失败
err
错误信息
data
表示返回的数据
true 或 false
{
"code" : 200 ,
"data" : true ,
"err" : ""
}
在线调试
获取用户资料
{{serverUrl}} /api/AppUsers/:appId /Profile
请求参数 示例 返回数据
说明
请求方式
GET
登陆凭证
Bearer Token
cURL C# Java NodeJs Python JavaScript
curl --location 'https://www.oauthapp.com/api/AppUsers/:appId/Profile' \
--header 'Authorization: Bearer {{access_token}}'
var client = new HttpClient ();
var request = new HttpRequestMessage ( HttpMethod . Get , "https://www.oauthapp.com/api/AppUsers/:appId/Profile" );
request . Headers . Add ( "Authorization" , "Bearer {{access_token}}" );
var response = await client . SendAsync ( request );
response . EnsureSuccessStatusCode ();
Console . WriteLine ( await response . Content . ReadAsStringAsync ());
OkHttpClient client = new OkHttpClient (). newBuilder ()
. build ();
MediaType mediaType = MediaType . parse ( "text/plain" );
RequestBody body = RequestBody . create ( mediaType , "" );
Request request = new Request . Builder ()
. url ( "https://www.oauthapp.com/api/AppUsers/:appId/Profile" )
. method ( "GET" , body )
. addHeader ( "Authorization" , "Bearer {{access_token}}" )
. build ();
Response response = client . newCall ( request ). execute ();
const axios = require ( 'axios' );
let config = {
method : 'get' ,
maxBodyLength : Infinity ,
url : 'https://www.oauthapp.com/api/AppUsers/:appId/Profile' ,
headers : {
'Authorization' : 'Bearer {{access_token}}'
}
};
axios . request ( config )
. then (( response ) => {
console . log ( JSON . stringify ( response . data ));
})
. catch (( error ) => {
console . log ( error );
});
import http.client
conn = http . client . HTTPSConnection ( "www.oauthapp.com" )
payload = ''
headers = {
'Authorization' : 'Bearer {{access_token}}'
}
conn . request ( "GET" , "/api/AppUsers/:appId/Profile" , payload , headers )
res = conn . getresponse ()
data = res . read ()
print ( data . decode ( "utf-8" ))
var myHeaders = new Headers ();
myHeaders . append ( "Authorization" , "Bearer {{access_token}}" );
var requestOptions = {
method : 'GET' ,
headers : myHeaders ,
redirect : 'follow'
};
fetch ( "https://www.oauthapp.com/api/AppUsers/:appId/Profile" , requestOptions )
. then ( response => response . text ())
. then ( result => console . log ( result ))
. catch ( error => console . log ( 'error' , error ));
说明
code
表示返回结果的状态码
200 表示成功,非 200 表示失败
err
错误信息
data
表示返回的数据
具体包含appID、platform、unionID、phone、createDate、userName、phoneIsValid、data、email、emailIsValid、lastUpdate、nickName、id、avatr 和 role
{
"code" : 200 ,
"data" : {
"appID" : 2 ,
"platform" : "wxminip" ,
"unionID" : "euadipi" ,
"phone" : "1111111111" ,
"createDate" : "2023-02-22 16:20:43" ,
"userName" : "euadipi" ,
"phoneIsValid" : true ,
"data" : null ,
"email" : "euadipi@wxminip.com" ,
"emailIsValid" : false ,
"lastUpdate" : "2023-02-22 16:20:43" ,
"nickName" : "wwww" ,
"id" : 39 ,
"avatar" : "avatar.jpg" ,
"role" : "user"
},
"err" : ""
}
在线调试
更新用户资料
{{serverUrl}} /api/AppUsers/:appId /Profile
请求参数 示例 返回数据
说明
请求方式
PUT
登陆凭证
Bearer Token
avatar
头像
nickName
昵称
data
自定义数据
cURL C# Java NodeJs Python JavaScript
curl --location --request PUT 'https://www.oauthapp.com/api/AppUsers/:appId/Profile' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {{access_token}}' \
--data '{"avatar": "","data": "","nickName": ""}'
var client = new HttpClient ();
var request = new HttpRequestMessage ( HttpMethod . Put , "https://www.oauthapp.com/api/AppUsers/:appId/Profile" );
request . Headers . Add ( "Authorization" , "Bearer {{access_token}}" );
var content = new StringContent ( "{\"avatar\": \"\",\"data\": \"\",\"nickName\": \"\"}" , null , "application/json" );
request . Content = content ;
var response = await client . SendAsync ( request );
response . EnsureSuccessStatusCode ();
Console . WriteLine ( await response . Content . ReadAsStringAsync ());
OkHttpClient client = new OkHttpClient (). newBuilder ()
. build ();
MediaType mediaType = MediaType . parse ( "application/json" );
RequestBody body = RequestBody . create ( mediaType , "{\"avatar\": \"\",\"data\": \"\",\"nickName\":\"\"}" );
Request request = new Request . Builder ()
. url ( "https://www.oauthapp.com/api/AppUsers/:appId/Profile" )
. method ( "PUT" , body )
. addHeader ( "Content-Type" , "application/json" )
. addHeader ( "Authorization" , "Bearer {{access_token}}" )
. build ();
Response response = client . newCall ( request ). execute ();
const axios = require ( 'axios' );
let data = JSON . stringify ({
"avatar" : "" ,
"data" : "" ,
"nickName" : ""
});
let config = {
method : 'put' ,
maxBodyLength : Infinity ,
url : 'https://www.oauthapp.com/api/AppUsers/:appId/Profile' ,
headers : {
'Content-Type' : 'application/json' ,
'Authorization' : 'Bearer {{access_token}}'
},
data : data
};
axios . request ( config )
. then (( response ) => {
console . log ( JSON . stringify ( response . data ));
})
. catch (( error ) => {
console . log ( error );
});
import http.client
import json
conn = http . client . HTTPSConnection ( "www.oauthapp.com" )
payload = json . dumps ({
"avatar" : "" ,
"data" : "" ,
"nickName" : ""
})
headers = {
'Content-Type' : 'application/json' ,
'Authorization' : 'Bearer {{access_token}}'
}
conn . request ( "PUT" , "/api/AppUsers/:appId/Profile" , payload , headers )
res = conn . getresponse ()
data = res . read ()
print ( data . decode ( "utf-8" ))
var myHeaders = new Headers ();
myHeaders . append ( "Content-Type" , "application/json" );
myHeaders . append ( "Authorization" , "Bearer {{access_token}}" );
var raw = JSON . stringify ({
"avatar" : "" ,
"data" : "" ,
"nickName" : ""
});
var requestOptions = {
method : 'PUT' ,
headers : myHeaders ,
body : raw ,
redirect : 'follow'
};
fetch ( "https://www.oauthapp.com/api/AppUsers/:appId/Profile" , requestOptions )
. then ( response => response . text ())
. then ( result => console . log ( result ))
. catch ( error => console . log ( 'error' , error ));
说明
code
表示返回结果的状态码
200 表示成功,非 200 表示失败
err
错误信息
data
表示返回的数据
true 或 false
{
"code" : 200 ,
"data" : true ,
"err" : ""
}
在线调试
积分记录
{{serverUrl}} /api/AppUsers/:appId /PointLog?type=&skip=&take=
请求参数 示例 返回数据
参数
说明
请求方式
GET
登陆凭证
Bearer Token
type
分类
0:全部,1:充值,2:消耗
skip
可选,指定要拉取的数据条数。
0
take
可选,指定要跳过的数据条数。
10
cURL C# Java NodeJs Python JavaScript
curl --location 'https://www.oauthapp.com/api/AppUsers/:appId/PointLog?type=&skip=&take=' \
--header 'Authorization: Bearer {{access_token}}'
var options = new RestClientOptions ( "https://www.oauthapp.com" );
var client = new RestClient ( options );
var request = new RestRequest ( "/api/AppUsers/:appId/PointLog?type=&skip=&take=" , Method . Get );
request . AddHeader ( "Authorization" , "Bearer {{access_token}}" );
RestResponse response = await client . ExecuteAsync ( request );
Console . WriteLine ( response . Content );
OkHttpClient client = new OkHttpClient (). newBuilder ()
. build ();
MediaType mediaType = MediaType . parse ( "text/plain" );
RequestBody body = RequestBody . create ( mediaType , "" );
Request request = new Request . Builder ()
. url ( "https://www.oauthapp.com/api/AppUsers/:appId/PointLog?type=&skip=&take=" )
. method ( "GET" , body )
. addHeader ( "Authorization" , "Bearer {{access_token}}" )
. build ();
Response response = client . newCall ( request ). execute ();
const axios = require ( 'axios' );
let config = {
method : 'get' ,
maxBodyLength : Infinity ,
url : 'https://www.oauthapp.com/api/AppUsers/:appId/PointLog?type=&skip=&take=' ,
headers : {
'Authorization' : 'Bearer {{access_token}}'
}
};
axios . request ( config )
. then (( response ) => {
console . log ( JSON . stringify ( response . data ));
})
. catch (( error ) => {
console . log ( error );
});
import http.client
conn = http . client . HTTPSConnection ( "www.oauthapp.com" )
payload = ''
headers = {
'Authorization' : 'Bearer {{access_token}}'
}
conn . request ( "GET" , "/api/AppUsers/:appId/PointLog?type=&skip=&take=" , payload , headers )
res = conn . getresponse ()
data = res . read ()
print ( data . decode ( "utf-8" ))
var myHeaders = new Headers ();
myHeaders . append ( "Authorization" , "Bearer {{access_token}}" );
var requestOptions = {
method : 'GET' ,
headers : myHeaders ,
redirect : 'follow'
};
fetch ( "https://www.oauthapp.com/api/AppUsers/:appId/PointLog?type=&skip=&take=" , requestOptions )
. then ( response => response . text ())
. then ( result => console . log ( result ))
. catch ( error => console . log ( 'error' , error ));
说明
code
表示返回结果的状态码
200 表示成功,非 200 表示失败
data
表示返回的数据
err
错误信息
{
"code" : 200 ,
"data" : {
"total" : 2 ,
"data" : [
{
"id" : 2 ,
"userID" : 84 ,
"used" : 10000 ,
"remark" : "" ,
"createDate" : "2023-06-16 15:35:06"
},
{
"id" : 1 ,
"userID" : 84 ,
"used" : 10000 ,
"remark" : "" ,
"createDate" : "2023-06-16 15:23:50"
}
]
},
"err" : ""
}
在线调试
充值积分
{{serverUrl}} /api/AppUsers/:appId /RechargePoints
请求参数 示例 返回数据
参数
说明
请求方式
GET
登陆凭证
Bearer Token
price
充值金额,必填
1
remark
备注信息,可选
cURL C# Java NodeJs Python JavaScript
curl --location 'https://www.oauthapp.com/api/AppUsers/:appId/RechargePoints' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {{access_token}}' \
--data '{
"price": 0,
"remark": "string"
}'
var client = new HttpClient ();
var request = new HttpRequestMessage ( HttpMethod . Post , "https://www.oauthapp.com/api/AppUsers/:appId/RechargePoints" );
request . Headers . Add ( "Authorization" , "Bearer {{access_token}}" );
var content = new StringContent ( "{\r\n \"price\": 0,\r\n \"remark\": \"string\"\r\n}" , null , "application/json" );
request . Content = content ;
var response = await client . SendAsync ( request );
response . EnsureSuccessStatusCode ();
Console . WriteLine ( await response . Content . ReadAsStringAsync ());
OkHttpClient client = new OkHttpClient (). newBuilder ()
. build ();
MediaType mediaType = MediaType . parse ( "application/json" );
RequestBody body = RequestBody . create ( mediaType , "{\r\n \"price\": 0,\r\n \"remark\": \"string\"\r\n}" );
Request request = new Request . Builder ()
. url ( "https://www.oauthapp.com/api/AppUsers/:appId/RechargePoints" )
. method ( "POST" , body )
. addHeader ( "Content-Type" , "application/json" )
. addHeader ( "Authorization" , "Bearer {{access_token}}" )
. build ();
Response response = client . newCall ( request ). execute ();
const axios = require ( 'axios' );
let data = JSON . stringify ({
"price" : 0 ,
"remark" : "string"
});
let config = {
method : 'post' ,
maxBodyLength : Infinity ,
url : 'https://www.oauthapp.com/api/AppUsers/:appId/RechargePoints' ,
headers : {
'Content-Type' : 'application/json' ,
'Authorization' : 'Bearer {{access_token}}'
},
data : data
};
axios . request ( config )
. then (( response ) => {
console . log ( JSON . stringify ( response . data ));
})
. catch (( error ) => {
console . log ( error );
});
import http.client
import json
conn = http . client . HTTPSConnection ( "www.oauthapp.com" )
payload = json . dumps ({
"price" : 0 ,
"remark" : "string"
})
headers = {
'Content-Type' : 'application/json' ,
'Authorization' : 'Bearer {{access_token}}'
}
conn . request ( "POST" , "/api/AppUsers/:appId/RechargePoints" , payload , headers )
res = conn . getresponse ()
data = res . read ()
print ( data . decode ( "utf-8" ))
var myHeaders = new Headers ();
myHeaders . append ( "Content-Type" , "application/json" );
myHeaders . append ( "Authorization" , "Bearer {{access_token}}" );
var raw = JSON . stringify ({
"price" : 0 ,
"remark" : "string"
});
var requestOptions = {
method : 'POST' ,
headers : myHeaders ,
body : raw ,
redirect : 'follow'
};
fetch ( "https://www.oauthapp.com/api/AppUsers/:appId/RechargePoints" , requestOptions )
. then ( response => response . text ())
. then ( result => console . log ( result ))
. catch ( error => console . log ( 'error' , error ));
说明
code
表示返回结果的状态码
200 表示成功,非 200 表示失败
data
表示返回的数据
err
错误信息
{
"code" : 200 ,
"data" : true ,
"err" : ""
}
在线调试
最后更新:
October 30, 2023