# Account
This section provide account related functions for users to register, reset password, update passsword/email based on Tapatalk ID. Function get_config will return one more key as 'inappreg' to indicate functions in this section are supported (except function sign_in). Function get_config will return one more key as 'inappsignin' to indicate function sign_in was supported.
# sign_in
Function:
Function Name | Description | Level |
---|---|---|
sign_in | Sign in with tapatalk id. When the account does not exist, register one first. Controlled by flag 'sign_in' returned in get_config. |
Input Parameters:
Name | Type | Required? | Description | Level |
---|---|---|---|---|
token | String | yes | login with tapatalk id will get the token | |
code | String | yes | md5 of fid, tapatalk id join email of tapatalk id, sample: md5('123|1234|xxxx@gmail.com') | |
byte[] | email of the account you'll be sign in. When you are sure the account already exists and want to sign in directly, provide email with token and code, don't need username and password | |||
username | byte[] | username of the account you'll be sign in. When you are sure the account already exists and want to sign in directly, provide username with token and code, don't need email and password | ||
password | byte[] | Provide password if you want to register an account before sign in. In this case you need provide all five parameters. |
Output Parameters:
Name | Type | Required? | Description | Level |
---|---|---|---|---|
status | String | For account register, '1' means username was occupied, '2' means app need ask for username from user, '3' means the email of the account app request to login does not match with tapatalk id email, and others are of no concern. Other response fields are the same as plugin function login | ||
register | Boolean | Indicate it's a new register or just a login. True for new register. | ||
preview_topic_id | String | Some forums require new registered user to read a preset topic before he can do any other actions in the forum. Then return the topic id here. App will jump to the topic after registration. | ||
Array of Hash table | yes | The response structure is the same as function login |
# forget_password
Function:
Function Name | Description | Level |
---|---|---|
forget_password | Request for password reset |
Input Parameters:
Name | Type | Required? | Description | Level |
---|---|---|---|---|
username | byte[] | yes | Account login name you want to reset the password | |
token | String | yes | login with tapatalk id will get the token | |
code | String | yes | md5 of fid, tapatalk id join email of tapatalk id, sample: md5('123|1234|xxxx@gmail.com') |
Output Parameters:
Name | Type | Required? | Description | Level |
---|---|---|---|---|
result | Boolean | yes | Password reset email was sent out or 'verified' was true and app can do password update directly | |
result_text | byte[] | Error message | ||
verified | Boolean | yes | the register email address of this username is the same as Tapatalk ID, user can reset the password directly in app |
# update_password
Function:
Function Name | Description | Level |
---|---|---|
update_password | Update current user's password. Normally user can update account password with present password. Or user can reset password directly if this account is registered with the same email address of Tapatalk ID, however app side need rerify the Tapatalk ID password again. |
Input Parameters:
Name | Type | Required? | Description | Level |
---|---|---|---|---|
Case 1 | Array of Hash table | Case 1 request two parameters and was used to update password in user profile view with old forum account password | ||
old_password | byte[] | yes | Current forum account password | |
new_password | byte[] | yes | New password to be udpated to. | |
Case 2 | Array of Hash table | Case 2 request three parameters and user used to update directly with tapatalk id token and code. | ||
new_password | byte[] | yes | New password to be udpated to. | |
token | String | yes | login with tapatalk id will get the token | |
code | String | yes | md5 of fid, tapatalk id join email of tapatalk id, sample: md5('123|1234|xxxx@gmail.com') |
Output Parameters:
Name | Type | Required? | Description | Level |
---|---|---|---|---|
result | Boolean | yes | Response status | |
result_text | byte[] | Error message |
# update_email
Function:
Function Name | Description | Level |
---|---|---|
update_email | Update current user's email address |
Input Parameters:
Name | Type | Required? | Description | Level |
---|---|---|---|---|
password | byte[] | yes | Current forum account password | |
new_email | byte[] | yes | New email address to be updated to |
Output Parameters:
Name | Type | Required? | Description | Level |
---|---|---|---|---|
result | Boolean | yes | Response status | |
result_text | byte[] | Error message |
# register
Function:
Function Name | Description | Level |
---|---|---|
register | register a new forum account. If token and code was provide and verified, new registered account no need activation. This function was substituted by new 'sign_in' function which can do register and login together. |
Input Parameters:
Name | Type | Required? | Description | Level |
---|---|---|---|---|
username | byte[] | yes | ||
password | byte[] | yes | ||
byte[] | yes | |||
token | String | login with tapatalk id will get the token | ||
code | String | md5 of fid, tapatalk id join email of tapatalk id, sample: md5('123|1234|xxxx@gmail.com') |
Output Parameters:
Name | Type | Required? | Description | Level |
---|---|---|---|---|
result | Boolean | yes | Response status | |
result_text | byte[] | Error message | ||
preview_topic_id | String | Some forums require new registered user to read a preset topic before he can do any other actions in the forum. Then return the topic id here. App will jump to the topic after registration. |