Klat
  • TalkPlus SDK
  • Android
    • Getting Started
    • Callback
    • User
      • Create User / Login
      • Update User Information
      • Block / Unblock
      • Logout
      • Delete User
    • Channel
      • Create / Delete Channel
      • View Channel
      • Updating Channel
      • Viewing Channel LIst
      • Manage Channel Members
      • Join / Leave Channel
      • Messaging
      • Hide / Show Channel
      • Freeze / Unfreeze Channel
      • Transfer Channel Ownership
      • Channel Push Notification Settings
      • Channel Member Data
    • Push Notification
    • Sample Application
    • What's New
  • iOS
    • Getting Started
    • Callback
    • User
      • Create / Login
      • Update User Information
      • Block / Unblock
      • Logout
      • Delete User
    • Channel
      • Create / Delete Channel
      • View Channel
      • Updating Channel
      • View Channel List
      • Manage Channel Members
      • Join / Leave Channel
      • Messaging
      • Hide / Show Channel
      • Freeze / Unfreeze Channel
      • Transfer Channel Ownership
      • Channel Push Notification Settings
      • Channel Member Data
    • Push Notification
    • Sample Application
    • What's New
  • Unity
    • Getting Started
    • Callback
    • User
      • Create User / Login
      • Update User Information
      • Block / Unblock
      • Logout
      • Delete User
    • Channel
      • Create / Delete Channel
      • View Channel
      • Updating Channel
      • View Channel List
      • Manage Channel Members
      • Join / Leave Channel
      • Messaging
      • Hide / Show Channel
      • Freeze / Unfreeze Channel
      • Transfer Channel Ownership
      • Channel Push Notification Settings
      • Channel Member Data
    • Push Notification
    • Sample Application
  • JavaScript
    • Getting Started
    • Realtime Event
    • Pagination
    • User
      • Create User / Login
      • Update User Information
      • Block / Unblock
      • Logout
      • Delete
    • Channel
      • Create / Delete Channel
      • View Channel
      • Updating Channel
      • View Channel List
      • Manage Channel Members
      • Join / Leave Channel
      • Messaging
      • Hide / Show Channel
      • Freeze / Unfreeze Channel
      • Transfer Channel Ownership
      • Channel Push Notification Settings
      • Channel Member Data
    • Push Notification (FCM)
    • Sample Application
    • What's New
  • Flutter
    • Getting Started
    • Callback
    • User
      • Create User / Login
      • Update User Information
      • Block / Unblock
      • Logout
      • Delete User
    • Channel
      • Create Channel
      • View Channel
      • Updating Channel
      • View Channel List
      • Manage Channel Members
      • Join / Leave Channel
      • Messaging
      • Hide / Show Channel
      • Freeze / Unfreeze Channel
      • Transfer Channel Ownership
      • Channel Push Notification Settings
      • Channel Member Data
    • Push Notification (FCM)
  • REST API
    • Getting Started
    • API
      • Users
        • Create User
        • Login (using login token)
        • View User
        • Update User
        • Activate / Deactivate
        • Enable / Disable Push Notification
        • Delete User
        • View Users
        • View Channels
        • Block / Unblock
      • Channel
        • Create Channel
        • View Channel
        • Update Channel
        • Delete Channel
        • View Channel List
        • Manage Channel Members
        • Messaging
        • Hide / Show Channel
        • Channel Freeze / Unfreeze
        • Transfer Channel Ownership
        • Channel Push Notification Settings
      • Bot
        • Create Bot
        • View Bot List
        • View Bot
        • Update Bot
        • Delete Bot
        • View Joined Channel List
        • Messaging
        • Join / Leave Channel
    • Push Notification
    • Rate Limit
  • MISC
    • Webhooks
    • SDK Rate Limit
    • Error Code
    • FAQ
      • Function
      • Spec
Powered by GitBook
On this page
  • Update User
  • Update User / Upload Profile Image File
  • Change User Password
  • Register FCM Token
  1. REST API
  2. API
  3. Users

Update User

Update User

PUT https://api.talkplus.io/v1.4/api/users/:userId

You can enter up to 5 key-value pairs in data field. The maximum size of key is 128 characters and the maximum size of value is 1024 characters. Both key and value must be strings.

Path Parameters

Name
Type
Description

userId*

string

Headers

Name
Type
Description

content-type

string

application/json

app-id*

string

App ID

api-key*

string

App API key

Request Body

Name
Type
Description

username

string

max char length: 128

profileImageUrl

string

data

object

Key-value data

{
  "user": {
    "id": "user456",
    "username": "john",
    "profileImageUrl": "http://cnd.test.com/123.jpg",
    "disablePushNotification": false,
    "data": {
      "someMetaKey1": "someMetaValue1",
      "someMetaKey2": "someMetaValue2"
    },
    "updatedAt": 1603244410844,
    "createdAt": 1603244410844
  }
}
{
  "error": true,
  "code": "1006",
  "message": "Unauthorized"
}

Update User / Upload Profile Image File

PUT https://api.talkplus.io/v1.4/api/users/:userId

  • In case of image file upload, Content-Type must be multipart/form-data.

  • Maximum upload size is 15MB.

  • You can enter up to 5 key-value pairs in data field. The maximum size of key is 128 characters and the maximum size of value is 1024 characters. Both key and value must be strings.

Path Parameters

Name
Type
Description

userId*

string

Headers

Name
Type
Description

content-type

string

must be "multipart/form-data"

app-id*

string

App ID

api-key*

string

App API key

Request Body

Name
Type
Description

username

string

max char length: 128

data

object

JSON formatted string

file

string

File

{
  "user": {
    "id": "user456",
    "username": "john",
    "profileImageUrl": "http://cnd.test.com/123.jpg",
    "disablePushNotification": false,
    "data": {
      "someMetaKey1": "someMetaValue1",
      "someMetaKey2": "someMetaValue2"
    },
    "updatedAt": 1603244410844,
    "createdAt": 1603244410844
  }
}
{
  "error": true,
  "code": "1006",
  "message": "Unauthorized"
}

Change User Password

PUT https://api.talkplus.io/v1.4/api/users/:userId/password

Change user password

There is no length limit, but if the password is longer than 72 characters, only the first 72 characters will be considered.

Path Parameters

Name
Type
Description

userId*

string

Headers

Name
Type
Description

content-type

string

application/json

app-id*

string

App ID

api-key*

string

App API key

Request Body

Name
Type
Description

password*

string

new password. There is no length limit, but if the password is longer than 72 characters, only the first 72 characters will be considered.

{
  "user": {
    "id": "user456",
    "username": "john",
    "profileImageUrl": "http://cnd.test.com/123.jpg",
    "disablePushNotification": false,
    "data": {
      "someMetaKey1": "someMetaValue1",
      "someMetaKey2": "someMetaValue2"
    },
    "updatedAt": 1603244410844,
    "createdAt": 1603244410844
  },
  "loginToken": "sfZtlsgkf3tLLk5H245dsK"
}
{
  "error": true,
  "code": "1006",
  "message": "Unauthorized"
}

Register FCM Token

POST https://api.talkplus.io/v1.4/api/users/:userId/register/fcm

Register FCM token for specific user

Path Parameters

Name
Type
Description

userId*

string

user ID

Headers

Name
Type
Description

content-type*

string

application/json

app-id*

string

App ID

api-key*

string

App API key

Request Body

Name
Type
Description

deviceId*

string

device ID to which FCM token will be registered

fcmToken*

string

FCM token

{}
{
  "error": true,
  "code": "1006",
  "message": "Unauthorized"
}
PreviousView UserNextActivate / Deactivate

Last updated 6 months ago