API Endpoints

Auth

Sign In

POST http://<host>/auth/signIn

Sign in user

Request Body

Name
Type
Description

password

string

password

phone

string

Phone number in format [0-9]

{ 
   "response":{
      "_id": "5ccdbae9041d1f7e2f756e5d",
      "first_name": "Nina",
      "last_name": "Davis",
      "username": "avisgreen",
      "access_token": "0sXcSD9vLp1tI0vnA4IuvEU6u5R5YrT5QrFh/Ck1M4c=",
      "socket_token": "5d4be0732a2dd4ec1109700a9f928d6e",
      "picture": { 
         "url": "https://s3.amazonaws.com/uifaces/faces/twitter/rob_thomas10/128.jpg",
         "width": 100,
         "height": 100,
         "preveiw": "iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAAXNSR0IArs4c6QAAABxpRE9UAAAAAgAAAAAAAAADAAAAKAAAAAMAAAACAAAAf+tg75kAAABLSURBVBgZAD8AwP8Ab8nc/ym30f9WxNv/VMbc/1jF4P8Ac8nU/4XQ3P+a3On/e9Ll/4fT5v8AfsnS/+Dy9v/K0NP/sc7Z/7PV4/8AAAD//2t1hBwAAAAzSURBVAEqANX/AK3L0v/L2+D/nJeZ/0Nccf9/vOD/AI21v/+dvMb/nbe8/6mrsf98v97/6M5NzdSora8AAAAASUVORK5CYII="
      }
   }
}

Sign Up

POST http://<host>/auth/signUp

Request Body

Name
Type
Description

phone

string

last_name

string

password

string

username

string

Log out

POST http://<host>/auth/deactivateToken

Request Body

Name
Type
Description

access_token

string

Account

Change Information

POST http://<host>/account/changeInfo

Request Body

Name
Type
Description

access_token

string

first_name

string

last_name

string

username

string

Change password

POST http://<host>/account/changePassword

Request Body

Name
Type
Description

access_token

string

password

string

New password

Change user picture

POST http://<host>/account/changePicture

Request Body

Name
Type
Description

access_token

string

url

string

width

string

height

string

preview

string

Base64 5 x 5 px

Remove user picture

POST http://<host>/account/removePicture

Request Body

Name
Type
Description

access_token

string

Register device for push notification

POST http://<host>/account/registerDevice

Request Body

Name
Type
Description

access_token

string

device_platform

string

device_year

string

system_version

string

token

string

ExponentPushToken[xxxxxxxxxxxxxxxxx]

Unregister device

POST http://<host>/account/unregisterDevice

Request Body

Name
Type
Description

access_token

string

token

string

ExponentPushToken[xxxxxxxxxxxxxxxx]

User

Checking username for availability

POST http://<host>/users/checkUsernameAvailable

Return { "response": true } or is taken { "response": false }

Path Parameters

Name
Type
Description

username

string

Get current user info

POST http://<host>/users/getCurrentUser

Request Body

Name
Type
Description

access_token

string

Search by username

POST http://<host>/users/search

Request Body

Name
Type
Description

access_token

string

username

string

Contacts

Sync contacts

POST http://<host>/contacts/sync

Request Body

Name
Type
Description

access_token

string

phone_numbers

string

phone numbers in format "[0-9], [0-9]"

Getting users among contacts

POST http://<host>/contacts/get

Request Body

Name
Type
Description

access_token

string

Messages

Message send

POST http://<host>/messages/send

Request Body

Name
Type
Description

access_token

string

attachment

string

object: { photo: { url, width, height, preview } }

text

string

recipient_id

string

user id to whom the message is send

Get user dialogs

POST http://<host>/messages/getDialogs

Request Body

Name
Type
Description

access_token

string

offset

integer

Get conversation history

POST http://<host>/messages/getHistory

Request Body

Name
Type
Description

access_token

string

offset

integer

recipient_id

string

Mark as read messages

POST http://<host>/messages/markAsRead

Request Body

Name
Type
Description

access_token

string

message_ids

string

format "message_id, message_id"

dialog_id

string

recipient_id

string

Delete dialog

POST http://<host>/messages/deleteDialog

Request Body

Name
Type
Description

access_token

string

dialog_id

string

Last updated

Was this helpful?