?? LoveLink API Documentation

Base URL: https://api.lovelink.in/v1/
PHASE 1 — AUTHENTICATION

POST https://api.lovelink.in/v1/auth/register.php

{
  "name": "Rahul Sharma",
  "email": "rahul@gmail.com",
  "mobile": "9876543210",
  "gender": "male",
  "age": 26,
  "password": "Strong@123",
  "device_id": "ANDROID-DEVICE-ID"
}
{
  "success": true,
  "message": "Registration successful",
  "user_id": 1021
}

POST https://api.lovelink.in/v1/auth/login.php

{
  "email": "rahul@gmail.com",
  "password": "Strong@123",
  "device_id": "ANDROID-DEVICE-ID"
}
{
  "success": true,
  "access_token": "JWT_TOKEN",
  "refresh_token": "REFRESH_TOKEN",
  "expires_in": 3600
}
PHASE 2 — USER & PROFILE

GET https://api.lovelink.in/v1/users/profile_get.php

Authorization: Bearer JWT_TOKEN
{
  "name": "Rahul Sharma",
  "gender": "male",
  "age": 26,
  "looking_for": "female",
  "bio": "Love to travel",
  "profile_complete": true
}

POST https://api.lovelink.in/v1/users/profile_update.php

{
  "looking_for": "female",
  "interests": ["Music","Travel","Gym"],
  "bio": "Fitness lover",
  "hobbies": ["music", "travel", "gym"],
  "country": "India",
  "city": "Kolkata"
}
{
  "success": true,
  "message": "Profile updated"
}
PHASE 3 — MATCH & CHAT

POST https://api.lovelink.in/v1/matches/request.php

{
  "target_user_id": 2055
}
{
  "status": "request_sent"
}

GET https://api.lovelink.in/v1/chat/restore_last_15d.php

?chat_id=CHAT_1021_2055
{
  "chat_id": "CHAT_1021_2055",
  "messages": [
    {
      "from": 1021,
      "to": 2055,
      "encrypted_message": "AES_ENCRYPTED_TEXT",
      "time": "2026-01-01T10:20:00Z"
    }
  ]
}
PHASE 4 — SOCKET & CALL

Socket Connection

wss://api.lovelink.in:5000
Authorization: Bearer JWT_TOKEN

Send Message

{
  "event": "send_message",
  "data": {
    "to": 2055,
    "encrypted_message": "AES_TEXT"
  }
}

Call Events

{
  "event": "call_request",
  "data": { "to": 2055, "type": "video" }
}
{
  "event": "call_accept",
  "data": { "room": "CALL_1021_2055" }
}
{
  "event": "call_end",
  "reason": "Low balance"
}
ANDROID / POSTMAN RESPONSES

? Success

{
  "success": true,
  "message": "Action successful"
}

? Invalid Login

{
  "success": false,
  "error_code": "INVALID_LOGIN",
  "message": "Email or password incorrect"
}

?? Account Blocked

{
  "success": false,
  "error_code": "ACCOUNT_BLOCKED",
  "message": "Your account is suspended"
}

? Rate Limit

{
  "success": false,
  "error_code": "RATE_LIMIT",
  "message": "Too many requests"
}

?? Unauthorized

{
  "success": false,
  "error_code": "UNAUTHORIZED",
  "message": "Invalid or expired token"
}