User
IMPORTANT!
Server Key ID and Server Key Secret will be used to construct a request and add as a HTTP Header. To construct a request, please format your generated Server Key ID and Server Key Secret and wrap it to Base64, so the format will be like this:
encodeToBase64(SERVER_KEY_ID:SERVER_KEY_SECRET) *don't forget to add colon (:) between Server Key ID and Server Key Secret
Then, put the base64 string on your HTTP Header Field with key “Server-Key” and then construct URL request and parameter for the request.

Update User

Update a user's profile.
The xcUserID is used to identify an existing user. If it does not exist yet, the user will be saved as a new user.
POST
1
BASE_URL/v1/server/user/update
2
3
example:
4
https://taptalk.io/v1/server/user/update
Copied!

Request

Field
Type
Description
xcUserID
string
(105) The user ID from customer's server (maximum 50 characters).
fullName
string
(106) The user's full name.
email (optional)
string
(107) The user's email address.
phone (optional)
string
(108) The user's phone, should start with country code.
username (optional)
string
(109) The user's username.
photoThumbnailURL (optional)
string
(110) The user's thumbnail picture image URL.
photoFullsizeURL (optional)
string
(111) The user's fullsize picture image URL.
userRoleCode (optional)
string
(112) The user's role code.
Request Example
1
{
2
"xcUserID": "6",
3
"fullName": "Jony",
4
"email": "[email protected]",
5
"phone": "08991234567",
6
"username": "jony",
7
"photoThumbnailURL": "http://www.example.com/photo/thumb/6.jpg",
8
"photoFullsizeURL": "http://www.example.com/photo/full/6.jpg",
9
"userRoleCode": "user"
10
}
Copied!

Success 200

Field
Type
Description
userID
string
The user ID.
Success Response
1
{
2
"status": 200,
3
"error": {
4
"code": "",
5
"message": "",
6
"field": ""
7
},
8
"data": {
9
"userID": "6"
10
}
11
}
Copied!

Error 4xx

Name
Description
ParamValidationFailed
The parameter validation failed.
HeaderValidationFailed
The request header validation failed.
ParamValidationFailed
1
{
2
"status": 400,
3
"error": {
4
"code": "40002",
5
"message": "Param 'xcUserID' is required",
6
"field": "105"
7
},
8
"data": {}
9
}
Copied!
HeaderValidationFailed
1
{
2
"status": 400,
3
"error": {
4
"code": "40001",
5
"message": "Request headers are required (Server-Key)",
6
"field": ""
7
},
8
"data": {}
9
}
Copied!