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.

BASE_URL/v1/server/user/update

example:
https://taptalk.io/v1/server/user/update

Request

{
    "xcUserID": "6",
    "fullName": "Jony",
    "email": "jony@email.com",
    "phone": "08991234567",
    "username": "jony",
    "photoThumbnailURL": "http://www.example.com/photo/thumb/6.jpg",
    "photoFullsizeURL": "http://www.example.com/photo/full/6.jpg",
    "userRoleCode": "user"
}

Success 200

{
  "status": 200,
  "error": {
    "code": "",
    "message": "",
    "field": ""
  },
  "data": {
    "userID": "6"
  }
}

Error 4xx

{
  "status": 400,
  "error": {
    "code": "40002",
    "message": "Param 'xcUserID' is required",
    "field": "105"
  },
  "data": {}
}
{
  "status": 400,
  "error": {
    "code": "40001",
    "message": "Request headers are required (Server-Key)",
    "field": ""
  },
  "data": {}
}

Last updated