POST api/User/UserInfo
获取用户信息
Request Information
Body Parameters
GetUserModel| Name | Description | Type | Additional information |
|---|---|---|---|
| UserId |
用户id |
integer |
None. |
| ThirdID |
第三方登录id |
string |
None. |
| ThirdType |
第三方登录类型 1. QQ 2. 微信 3. 微博 |
integer |
None. |
| Token |
登录后获取到的 Token |
string |
None. |
| Language |
语言选项 |
string |
None. |
| AppId |
APP应用标识 |
string |
None. |
Request Formats
application/json, text/json
Sample:
{
"UserId": 1,
"ThirdID": "sample string 2",
"ThirdType": 3,
"Token": "sample string 4",
"Language": "sample string 5",
"AppId": "sample string 6"
}
application/xml, text/xml
Sample:
<GetUserModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/NewGPS2012.AppApi.Models.ParModel"> <AppId>sample string 6</AppId> <Language>sample string 5</Language> <Token>sample string 4</Token> <ThirdID>sample string 2</ThirdID> <ThirdType>3</ThirdType> <UserId>1</UserId> </GetUserModel>
Response Information
Resource Description
State状态码说明:
0. 返回成功
1000. 用户不存在
| Name | Description | Type | Additional information |
|---|---|---|---|
| UserInfo |
用户信息 |
UserInfo |
None. |
| ThirdParty |
第三方登录信息 |
ThirdParty |
None. |
| State |
状态码 |
integer |
None. |
Response Formats
application/json, text/json
Sample:
{
"UserInfo": {
"UserId": 1,
"Username": "sample string 2",
"LoginName": "sample string 3",
"Email": "sample string 4",
"CellPhone": "sample string 5",
"Address": "sample string 6",
"Avatar": "sample string 7",
"FirstName": "sample string 8",
"Gender": true,
"Birthday": "2026-03-06T15:14:08.3470274+08:00",
"Weight": 10.1,
"Height": 11.1,
"Steps": 12,
"Distance": 13.1,
"SportTime": 14,
"Calorie": 15
},
"ThirdParty": {
"UserID": 1,
"ThirdImg": "sample string 2",
"ThirdName": "sample string 3",
"ThirdType": 4,
"ThirdID": "sample string 5"
},
"State": 1
}
application/xml, text/xml
Sample:
<GetUserResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/NewGPS2012.AppApi.Models.ResModel">
<State>1</State>
<ThirdParty xmlns:d2p1="http://schemas.datacontract.org/2004/07/NewGPS2012.AppApi.Models.ViewModel">
<d2p1:ThirdID>sample string 5</d2p1:ThirdID>
<d2p1:ThirdImg>sample string 2</d2p1:ThirdImg>
<d2p1:ThirdName>sample string 3</d2p1:ThirdName>
<d2p1:ThirdType>4</d2p1:ThirdType>
<d2p1:UserID>1</d2p1:UserID>
</ThirdParty>
<UserInfo xmlns:d2p1="http://schemas.datacontract.org/2004/07/NewGPS2012.AppApi.Models.ViewModel">
<d2p1:Address>sample string 6</d2p1:Address>
<d2p1:Avatar>sample string 7</d2p1:Avatar>
<d2p1:Birthday>2026-03-06T15:14:08.3470274+08:00</d2p1:Birthday>
<d2p1:Calorie>15</d2p1:Calorie>
<d2p1:CellPhone>sample string 5</d2p1:CellPhone>
<d2p1:Distance>13.1</d2p1:Distance>
<d2p1:Email>sample string 4</d2p1:Email>
<d2p1:FirstName>sample string 8</d2p1:FirstName>
<d2p1:Gender>true</d2p1:Gender>
<d2p1:Height>11.1</d2p1:Height>
<d2p1:LoginName>sample string 3</d2p1:LoginName>
<d2p1:SportTime>14</d2p1:SportTime>
<d2p1:Steps>12</d2p1:Steps>
<d2p1:UserId>1</d2p1:UserId>
<d2p1:Username>sample string 2</d2p1:Username>
<d2p1:Weight>10.1</d2p1:Weight>
</UserInfo>
</GetUserResult>