Create User

Create User

POST https://api.talkplus.io/v1.4/api/users/create

A login token is returned after creating a user. SDK client can use this login token to login.

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

  • 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.

Headers

NameTypeDescription

content-type

string

application/json

app-id*

string

App ID

api-key*

string

App API key

Request Body

NameTypeDescription

userId*

string

unique user ID (must be URI valid, max char length: 68)

password*

string

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

username

string

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
  },
  "loginToken": "sfZtlsgkf3tLLk5H245dsK"
}

Create User / Upload Profile Image File

POST https://api.talkplus.io/v1.4/api/users/create

  • 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.

Headers

NameTypeDescription

content-type

string

must be "multipart/form-data"

api-key*

string

App API key

app-id*

string

App ID

Request Body

NameTypeDescription

userId*

string

unique user ID (must be URI valid, max char length: 68)

password*

string

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

username

string

data

string

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
  },
  "loginToken": "sfZtlsgkf3tLLk5H245dsK"
}

Last updated