GoChat
  • Overview
  • Demo App
  • SDK Integration
  • Client-Side Implementation
  • GoChat Cloud Service
  • Server APIs
  • Error codes
  • Documentation
  • GoChat
  • Server APIs
  • Log In

Log In

Last updated:2022-03-22 13:06

1 Description

Logs in to the GoChat backend service to get the user ID.

Rate limit: 10 requests / second.

2 Request Method and Endpoint

  • Request method: POST
  • Request endpoint: /chat_room/login
  • Content-Type: application/json

3 Request Parameters

Parameter Type Required Example Description
nick_name String Yes "Shawn" User's nickname, a string with up to 15 characters.
avatar String Yes "1" Index of the user's profile picture.

4 Request Example

{
  "nick_name":"Shawn",
  "avatar":"1"
}

5 Response Parameters

Parameter Type Example Description
uid Int64 171171717 User ID.
nick_name String "Shawn" User's nickname.
avatar String "1" Index of the user's profile picture.

6 Response Example

{
  "ret": {
    "code": 0,
    "message": "succeed"
  },
  "data": {
    "uid": 171171717,
    "nick_name": "Shawn",
    "avatar": "1"
  }
}

7 Return Codes

Return Code Description
80000 This user name has been taken.
80001 Incorrect parameter.
Page Directory