POST api/User/ChangePassword

change password

Request Information

Body Parameters

ChangePasswordModel
NameDescriptionTypeAdditional information
LoginType

Login type, 0 Login for the user, 1 for device login

integer

None.

Id

Object id,logintype when it is 0 stands user id,logintype when it is 1,stands device id

integer

None.

OldPass

old password

string

None.

NewPass

New password

string

None.

SMSCode

SMS verification code [only used when supporting SMS verification]

string

None.

LoginName

string

None.

Token

Get it after logging in Token

string

None.

Language

Language Option

string

None.

AppId

APP Application Identifier

string

None.

Request Formats

application/json, text/json

Sample:
{
  "LoginType": 1,
  "Id": 2,
  "OldPass": "sample string 3",
  "NewPass": "sample string 4",
  "SMSCode": "sample string 5",
  "LoginName": "sample string 6",
  "Token": "sample string 7",
  "Language": "sample string 8",
  "AppId": "sample string 9"
}

application/xml, text/xml

Sample:
<ChangePasswordModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/NewGPS2012.AppApi.Models.ParModel">
  <AppId>sample string 9</AppId>
  <Language>sample string 8</Language>
  <Token>sample string 7</Token>
  <Id>2</Id>
  <LoginName>sample string 6</LoginName>
  <LoginType>1</LoginType>
  <NewPass>sample string 4</NewPass>
  <OldPass>sample string 3</OldPass>
  <SMSCode>sample string 5</SMSCode>
</ChangePasswordModel>

Response Information

Resource Description

State return state illustrate:
0. indicates modify success
1000. The user does not exist
1004. wrong password
1100. device does not exist
1104. Device error
2002. Incorrect parameter

NormalResult
NameDescriptionTypeAdditional information
Message

Message [in most cases, the message can be used as a prompt]

string

None.

State

status code

integer

None.

Response Formats

application/json, text/json

Sample:
{
  "Message": "sample string 1",
  "State": 2
}

application/xml, text/xml

Sample:
<NormalResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/NewGPS2012.AppApi.Models.ResModel">
  <State>2</State>
  <Message>sample string 1</Message>
</NormalResult>