Skip to content

API Reference

Muhammed Khalid edited this page May 2, 2021 · 8 revisions

API Reference

Authentication

Transaction


Send

/transaction/send/


Description

Creates a transaction between user and recipient along with updating their SpotMe balance

URL Structure

https://spotme.com/transaction/send

Handled from the SpotMe.com URL directly

Method

POST

Example

 https://spotme.com/transaction/send?user=<user>&recipientID=<id>&message=<message>&amount=<amount>

Parameters

  • recipientID String Recipient's User Id
  • message String message that describes the transaction

Example: $20 for dinner

  • amount Integer amount of the transaction between the two users

Returns

{
    "message": "Successfully created transaction",
    "user": {
        "id": "6085aab3253d62474bc59a01",
        "name": "awais",
        "username": "awais",
        "email": "email@gmail.com",
        "balance": 0,
        "img": ""
    }
}

Errors

{
    "message": "Insufficient balance to complete request"
}

Add Balance

/transaction/add-balance/


Description

Increases the user's SpotMe balance by the specified amount

URL Structure

https://spotme.com/transaction/add-balance

Handled from the SpotMe.com URL directly

Method

POST

Example

 https://spotme.com/transaction/add-balance?amount=<amount>

Parameters

  • amount String the amount of money to be added.

Returns

{
    "message": "Successfully updated your balance",
    "user": {
        "id": "6085aab3253d62474bc59a01",
        "name": "awais",
        "username": "awais",
        "email": "email@gmail.com",
        "balance": <BALANCE_AMOUNT>,
        "img": ""
    }
}

Errors

{
    "message": "Cast to number failed for value \"undefined\" at path \"balance\""
}

User Transactions

/transactions/user-transactions


Description

Get all transactions for SpotMe user

URL Structure

https://spotme.com/transaction/user-transactions

Handled from the SpotMe.com URL directly

Method

GET

Example

 https://spotme.com/transaction/user-transactions/

Parameters

  • None

Returns

{
    "message": "Succesfully retrieved user transactions",
    "transactions": []
}

Errors


All Transactions

/transactions/all-transactions


Description

Get all transactions for all users

URL Structure

https://spotme.com/transaction/all-transactions

Handled from the SpotMe.com URL directly

Method

GET

Example

 https://spotme.com/transaction/all-transactions/

Parameters

  • None

Returns

{
    "message": "Successfully retrieved all transactions",
    "transactions": []
}

Errors


Login

/auth/login/


Description

This starts and handles a user login session. Creates a token for the active user and the token remains active for 1 day(s).

URL Structure

https://spotme.com/auth/login

Handled from the SpotMe.com URL directly

Method

POST

Example

 https://spotme.com/auth/login?email=<email>&password=<password>

Parameters

  • email String The User's email address.
  • password String The User's password.

Returns

{
    "message": "Successfully logged in the user!",
    "token": "Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiI2MDg1YWFiMzI1M2Q2MjQ3NGJjNTlhMDEiLCJpYXQiOjE2MTkzNzI4OTM5NTIsImV4cCI6MTYxOTM3Mjk4MDM1Mn0.rHyQyn4FbvwA3bHlWx5jjV0Ew1zzEoc39uDbcju0vqIsInmXLuZOTwtJ6tVJjk0AUBQNbk4wpr7NqLGsdbBAKCYkMpBTyvPdmFm2fXF2mOj-50PxT0HITE4T8VeJMMwwrWM2zl7Ll8NMXtTMwBcKndr4A88tkOE0GyQOxxA0iZ4G2hAZ6UNTl_XiyHt6bMMkLgFVV1Wq9NzvdFMoZd60UFoGzGb8btIjr-bL1LwCr6xGuRPJuhxuc2Hqn0Rjb39sDX2hssHvr9Qx6EFhEin0NyjM_sY4ii0UMkbHHA-C3zMsAuLZuvzH8Wj-UKTLMoS1lxJvMQD_ijiSnmgsdkGiyVkBaVOw1KCDvaBfKbj0mefuu7ShQnWyDiBbdeLWtvTGdWUB9N4ZjiuuyYDIST3clffAIckcJmPngcKResMiILqUutwpzDs7WjPQn9EfpI_stiD8MnI5x2T7Si6fKOkapOXp_WwOJ8_nCaZd_st3ghJCtQ3hDGdUaCVlOLGgkOGXbXZfbpd7pVTW6aiCBw8obHnwe-VXSxM4kh7_j8ZAc__PknmI6RYLIWWAFtGh-F5_jZHaThN8dY6BWe1962m_v865zg_pCQkcllLiJBuJSmYeBuICm-YqjbMLahs3HJgzo1M5cqNXALFvQgl0WL4RvucqEtrtYX5SyHgWi9mj9GY",
    "expiresIn": "1d",
    "user": {
        "id": "6085aab3253d62474bc59a01",
        "name": "awais",
        "username": "awais",
        "email": "email@gmail.com",
        "balance": 0,
        "img": ""
    }
}

Errors

{
    "message": "Incorrect username or password! Please try again."
}

Signup

/auth/signup


Description

This starts and handles a user login session. Creates a token for the active user and the token remains active for 1 day(s).

URL Structure

https://spotme.com/auth/signup

Handled from the SpotMe.com URL directly

Method

POST

Example

 https://spotme.com/auth/login?email=<email>&password=<password>

Parameters

  • name String The User's First and Last Name.
  • username String The User's desired username.
  • email String The User's email address.
  • password String The User's desired password.
  • confirmPassword String Confirmation of the User's desired password.

Returns

  • message String Successfully signed up the user!
  • token String JSON Passport Authentication Token
  • expiresIn String Length of Provided JSON Passport Authentication Token

Update to use Okta Authentication

  • user Object A JSON Payload containing the User's information
    • id String Unique Id for User
    • name String User's Full Name
    • username String User's chosen username
    • email String User's chosen email address
    • balance Integer User's total and current balance
    • img String User's profile picture as an encoded string
{
    "message": "Successfully signed up the user!",
    "token": "<TOKEN>",
    "expiresIn": "1d",
    "user": {
        "id": "<USER_ID>",
        "name": "<USER_FIRST_NAME>",
        "username": "<USER_USERNAME>",
        "email": "<USER_EMAIL>",
        "balance": <USER_BALANCE>,
        "img": "<USER_IMAGE>"
    }
}

Errors

{
    "message": "Incorrect username or password! Please try again."
}

Change Password

/auth/change-password


Description

Endpoint for changing the User's password

URL Structure

https://spotme.com/auth/change-password

Method

POST

Example

 https://spotme.com/auth/login?email=<email>&password=<password>

Returns

{
    "message": "Successfully logged in the user!",
    "token": "<TOKEN>",
    "expiresIn": "1d",
    "user": {
        "id": "<ID>",
        "name": "awais",
        "username": "awais",
        "email": "email@gmail.com",
        "balance": 0,
        "img": ""
    }
}

Errors

{
    "message": "Incorrect username or password! Please try again."
}

Update Profile Pic

/auth/update-profile-pic/


Description

This starts and handles a user login session. Creates a token for the active user and the token remains active for 1 day(s).

URL Structure

https://spotme.com/auth/update-profile-pic

Handled from the SpotMe.com URL directly

Method

POST

Example

 https://spotme.com/auth/login?email=<email>&password=<password>

Returns

{
    "message": "Successfully logged in the user!",
    "token": "Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiI2MDg1YWFiMzI1M2Q2MjQ3NGJjNTlhMDEiLCJpYXQiOjE2MTkzNzI4OTM5NTIsImV4cCI6MTYxOTM3Mjk4MDM1Mn0.rHyQyn4FbvwA3bHlWx5jjV0Ew1zzEoc39uDbcju0vqIsInmXLuZOTwtJ6tVJjk0AUBQNbk4wpr7NqLGsdbBAKCYkMpBTyvPdmFm2fXF2mOj-50PxT0HITE4T8VeJMMwwrWM2zl7Ll8NMXtTMwBcKndr4A88tkOE0GyQOxxA0iZ4G2hAZ6UNTl_XiyHt6bMMkLgFVV1Wq9NzvdFMoZd60UFoGzGb8btIjr-bL1LwCr6xGuRPJuhxuc2Hqn0Rjb39sDX2hssHvr9Qx6EFhEin0NyjM_sY4ii0UMkbHHA-C3zMsAuLZuvzH8Wj-UKTLMoS1lxJvMQD_ijiSnmgsdkGiyVkBaVOw1KCDvaBfKbj0mefuu7ShQnWyDiBbdeLWtvTGdWUB9N4ZjiuuyYDIST3clffAIckcJmPngcKResMiILqUutwpzDs7WjPQn9EfpI_stiD8MnI5x2T7Si6fKOkapOXp_WwOJ8_nCaZd_st3ghJCtQ3hDGdUaCVlOLGgkOGXbXZfbpd7pVTW6aiCBw8obHnwe-VXSxM4kh7_j8ZAc__PknmI6RYLIWWAFtGh-F5_jZHaThN8dY6BWe1962m_v865zg_pCQkcllLiJBuJSmYeBuICm-YqjbMLahs3HJgzo1M5cqNXALFvQgl0WL4RvucqEtrtYX5SyHgWi9mj9GY",
    "expiresIn": "1d",
    "user": {
        "id": "6085aab3253d62474bc59a01",
        "name": "awais",
        "username": "awais",
        "email": "email@gmail.com",
        "balance": 0,
        "img": ""
    }
}

Errors

{
    "message": "Incorrect username or password! Please try again."
}

Profile Pic

/auth/profile-pic/


Description

This starts and handles a user login session. Creates a token for the active user and the token remains active for 1 day(s).

URL Structure

https://spotme.com/auth/profile-pic

Handled from the SpotMe.com URL directly

Method

POST

Example

 https://spotme.com/auth/login?email=<email>&password=<password>

Returns

{
    "message": "Successfully logged in the user!",
    "token": "Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiI2MDg1YWFiMzI1M2Q2MjQ3NGJjNTlhMDEiLCJpYXQiOjE2MTkzNzI4OTM5NTIsImV4cCI6MTYxOTM3Mjk4MDM1Mn0.rHyQyn4FbvwA3bHlWx5jjV0Ew1zzEoc39uDbcju0vqIsInmXLuZOTwtJ6tVJjk0AUBQNbk4wpr7NqLGsdbBAKCYkMpBTyvPdmFm2fXF2mOj-50PxT0HITE4T8VeJMMwwrWM2zl7Ll8NMXtTMwBcKndr4A88tkOE0GyQOxxA0iZ4G2hAZ6UNTl_XiyHt6bMMkLgFVV1Wq9NzvdFMoZd60UFoGzGb8btIjr-bL1LwCr6xGuRPJuhxuc2Hqn0Rjb39sDX2hssHvr9Qx6EFhEin0NyjM_sY4ii0UMkbHHA-C3zMsAuLZuvzH8Wj-UKTLMoS1lxJvMQD_ijiSnmgsdkGiyVkBaVOw1KCDvaBfKbj0mefuu7ShQnWyDiBbdeLWtvTGdWUB9N4ZjiuuyYDIST3clffAIckcJmPngcKResMiILqUutwpzDs7WjPQn9EfpI_stiD8MnI5x2T7Si6fKOkapOXp_WwOJ8_nCaZd_st3ghJCtQ3hDGdUaCVlOLGgkOGXbXZfbpd7pVTW6aiCBw8obHnwe-VXSxM4kh7_j8ZAc__PknmI6RYLIWWAFtGh-F5_jZHaThN8dY6BWe1962m_v865zg_pCQkcllLiJBuJSmYeBuICm-YqjbMLahs3HJgzo1M5cqNXALFvQgl0WL4RvucqEtrtYX5SyHgWi9mj9GY",
    "expiresIn": "1d",
    "user": {
        "id": "6085aab3253d62474bc59a01",
        "name": "awais",
        "username": "awais",
        "email": "email@gmail.com",
        "balance": 0,
        "img": ""
    }
}

Errors

{
    "message": "Incorrect username or password! Please try again."
}

Search Query

/auth/search-query/


Description

This starts and handles a user login session. Creates a token for the active user and the token remains active for 1 day(s).

URL Structure

https://spotme.com/auth/search-query

Handled from the SpotMe.com URL directly

Method

POST

Example

 https://spotme.com/auth/login?email=<email>&password=<password>

Returns

{
    "message": "Successfully logged in the user!",
    "token": "Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiI2MDg1YWFiMzI1M2Q2MjQ3NGJjNTlhMDEiLCJpYXQiOjE2MTkzNzI4OTM5NTIsImV4cCI6MTYxOTM3Mjk4MDM1Mn0.rHyQyn4FbvwA3bHlWx5jjV0Ew1zzEoc39uDbcju0vqIsInmXLuZOTwtJ6tVJjk0AUBQNbk4wpr7NqLGsdbBAKCYkMpBTyvPdmFm2fXF2mOj-50PxT0HITE4T8VeJMMwwrWM2zl7Ll8NMXtTMwBcKndr4A88tkOE0GyQOxxA0iZ4G2hAZ6UNTl_XiyHt6bMMkLgFVV1Wq9NzvdFMoZd60UFoGzGb8btIjr-bL1LwCr6xGuRPJuhxuc2Hqn0Rjb39sDX2hssHvr9Qx6EFhEin0NyjM_sY4ii0UMkbHHA-C3zMsAuLZuvzH8Wj-UKTLMoS1lxJvMQD_ijiSnmgsdkGiyVkBaVOw1KCDvaBfKbj0mefuu7ShQnWyDiBbdeLWtvTGdWUB9N4ZjiuuyYDIST3clffAIckcJmPngcKResMiILqUutwpzDs7WjPQn9EfpI_stiD8MnI5x2T7Si6fKOkapOXp_WwOJ8_nCaZd_st3ghJCtQ3hDGdUaCVlOLGgkOGXbXZfbpd7pVTW6aiCBw8obHnwe-VXSxM4kh7_j8ZAc__PknmI6RYLIWWAFtGh-F5_jZHaThN8dY6BWe1962m_v865zg_pCQkcllLiJBuJSmYeBuICm-YqjbMLahs3HJgzo1M5cqNXALFvQgl0WL4RvucqEtrtYX5SyHgWi9mj9GY",
    "expiresIn": "1d",
    "user": {
        "id": "6085aab3253d62474bc59a01",
        "name": "awais",
        "username": "awais",
        "email": "email@gmail.com",
        "balance": 0,
        "img": ""
    }
}

Errors

{
    "message": "Incorrect username or password! Please try again."
}

Is Friend

/auth/is-friend/


Description

This starts and handles a user login session. Creates a token for the active user and the token remains active for 1 day(s).

URL Structure

https://spotme.com/auth/is-friend

Handled from the SpotMe.com URL directly

Method

POST

Example

 https://spotme.com/auth/login?email=<email>&password=<password>

Returns

{
    "message": "Successfully logged in the user!",
    "token": "Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiI2MDg1YWFiMzI1M2Q2MjQ3NGJjNTlhMDEiLCJpYXQiOjE2MTkzNzI4OTM5NTIsImV4cCI6MTYxOTM3Mjk4MDM1Mn0.rHyQyn4FbvwA3bHlWx5jjV0Ew1zzEoc39uDbcju0vqIsInmXLuZOTwtJ6tVJjk0AUBQNbk4wpr7NqLGsdbBAKCYkMpBTyvPdmFm2fXF2mOj-50PxT0HITE4T8VeJMMwwrWM2zl7Ll8NMXtTMwBcKndr4A88tkOE0GyQOxxA0iZ4G2hAZ6UNTl_XiyHt6bMMkLgFVV1Wq9NzvdFMoZd60UFoGzGb8btIjr-bL1LwCr6xGuRPJuhxuc2Hqn0Rjb39sDX2hssHvr9Qx6EFhEin0NyjM_sY4ii0UMkbHHA-C3zMsAuLZuvzH8Wj-UKTLMoS1lxJvMQD_ijiSnmgsdkGiyVkBaVOw1KCDvaBfKbj0mefuu7ShQnWyDiBbdeLWtvTGdWUB9N4ZjiuuyYDIST3clffAIckcJmPngcKResMiILqUutwpzDs7WjPQn9EfpI_stiD8MnI5x2T7Si6fKOkapOXp_WwOJ8_nCaZd_st3ghJCtQ3hDGdUaCVlOLGgkOGXbXZfbpd7pVTW6aiCBw8obHnwe-VXSxM4kh7_j8ZAc__PknmI6RYLIWWAFtGh-F5_jZHaThN8dY6BWe1962m_v865zg_pCQkcllLiJBuJSmYeBuICm-YqjbMLahs3HJgzo1M5cqNXALFvQgl0WL4RvucqEtrtYX5SyHgWi9mj9GY",
    "expiresIn": "1d",
    "user": {
        "id": "6085aab3253d62474bc59a01",
        "name": "awais",
        "username": "awais",
        "email": "email@gmail.com",
        "balance": 0,
        "img": ""
    }
}

Errors

{
    "message": "Incorrect username or password! Please try again."
}

All Friends

/auth/all-friends/


Description

This starts and handles a user login session. Creates a token for the active user and the token remains active for 1 day(s).

URL Structure

https://spotme.com/auth/all-friends

Handled from the SpotMe.com URL directly

Method

GET

Example

 https://spotme.com/auth/login?email=<email>&password=<password>

Returns

{
    "message": "Successfully logged in the user!",
    "token": "Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiI2MDg1YWFiMzI1M2Q2MjQ3NGJjNTlhMDEiLCJpYXQiOjE2MTkzNzI4OTM5NTIsImV4cCI6MTYxOTM3Mjk4MDM1Mn0.rHyQyn4FbvwA3bHlWx5jjV0Ew1zzEoc39uDbcju0vqIsInmXLuZOTwtJ6tVJjk0AUBQNbk4wpr7NqLGsdbBAKCYkMpBTyvPdmFm2fXF2mOj-50PxT0HITE4T8VeJMMwwrWM2zl7Ll8NMXtTMwBcKndr4A88tkOE0GyQOxxA0iZ4G2hAZ6UNTl_XiyHt6bMMkLgFVV1Wq9NzvdFMoZd60UFoGzGb8btIjr-bL1LwCr6xGuRPJuhxuc2Hqn0Rjb39sDX2hssHvr9Qx6EFhEin0NyjM_sY4ii0UMkbHHA-C3zMsAuLZuvzH8Wj-UKTLMoS1lxJvMQD_ijiSnmgsdkGiyVkBaVOw1KCDvaBfKbj0mefuu7ShQnWyDiBbdeLWtvTGdWUB9N4ZjiuuyYDIST3clffAIckcJmPngcKResMiILqUutwpzDs7WjPQn9EfpI_stiD8MnI5x2T7Si6fKOkapOXp_WwOJ8_nCaZd_st3ghJCtQ3hDGdUaCVlOLGgkOGXbXZfbpd7pVTW6aiCBw8obHnwe-VXSxM4kh7_j8ZAc__PknmI6RYLIWWAFtGh-F5_jZHaThN8dY6BWe1962m_v865zg_pCQkcllLiJBuJSmYeBuICm-YqjbMLahs3HJgzo1M5cqNXALFvQgl0WL4RvucqEtrtYX5SyHgWi9mj9GY",
    "expiresIn": "1d",
    "user": {
        "id": "6085aab3253d62474bc59a01",
        "name": "awais",
        "username": "awais",
        "email": "email@gmail.com",
        "balance": 0,
        "img": ""
    }
}

Errors

{
    "message": "Incorrect username or password! Please try again."
}

Add Friend

/auth/add-friend/


Description

This starts and handles a user login session. Creates a token for the active user and the token remains active for 1 day(s).

URL Structure

https://spotme.com/auth/add-friend

Handled from the SpotMe.com URL directly

Method

POST

Example

 https://spotme.com/auth/login?email=<email>&password=<password>

Returns

{
    "message": "Successfully logged in the user!",
    "token": "Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiI2MDg1YWFiMzI1M2Q2MjQ3NGJjNTlhMDEiLCJpYXQiOjE2MTkzNzI4OTM5NTIsImV4cCI6MTYxOTM3Mjk4MDM1Mn0.rHyQyn4FbvwA3bHlWx5jjV0Ew1zzEoc39uDbcju0vqIsInmXLuZOTwtJ6tVJjk0AUBQNbk4wpr7NqLGsdbBAKCYkMpBTyvPdmFm2fXF2mOj-50PxT0HITE4T8VeJMMwwrWM2zl7Ll8NMXtTMwBcKndr4A88tkOE0GyQOxxA0iZ4G2hAZ6UNTl_XiyHt6bMMkLgFVV1Wq9NzvdFMoZd60UFoGzGb8btIjr-bL1LwCr6xGuRPJuhxuc2Hqn0Rjb39sDX2hssHvr9Qx6EFhEin0NyjM_sY4ii0UMkbHHA-C3zMsAuLZuvzH8Wj-UKTLMoS1lxJvMQD_ijiSnmgsdkGiyVkBaVOw1KCDvaBfKbj0mefuu7ShQnWyDiBbdeLWtvTGdWUB9N4ZjiuuyYDIST3clffAIckcJmPngcKResMiILqUutwpzDs7WjPQn9EfpI_stiD8MnI5x2T7Si6fKOkapOXp_WwOJ8_nCaZd_st3ghJCtQ3hDGdUaCVlOLGgkOGXbXZfbpd7pVTW6aiCBw8obHnwe-VXSxM4kh7_j8ZAc__PknmI6RYLIWWAFtGh-F5_jZHaThN8dY6BWe1962m_v865zg_pCQkcllLiJBuJSmYeBuICm-YqjbMLahs3HJgzo1M5cqNXALFvQgl0WL4RvucqEtrtYX5SyHgWi9mj9GY",
    "expiresIn": "1d",
    "user": {
        "id": "6085aab3253d62474bc59a01",
        "name": "awais",
        "username": "awais",
        "email": "email@gmail.com",
        "balance": 0,
        "img": ""
    }
}

Errors

{
    "message": "Incorrect username or password! Please try again."
}

Handle Friend Request

/auth/handle-friend-request/


Description

This starts and handles a user login session. Creates a token for the active user and the token remains active for 1 day(s).

URL Structure

https://spotme.com/auth/handle-friend-request

Handled from the SpotMe.com URL directly

Method

POST

Example

 https://spotme.com/auth/login?email=<email>&password=<password>

Returns

{
    "message": "Successfully logged in the user!",
    "token": "Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiI2MDg1YWFiMzI1M2Q2MjQ3NGJjNTlhMDEiLCJpYXQiOjE2MTkzNzI4OTM5NTIsImV4cCI6MTYxOTM3Mjk4MDM1Mn0.rHyQyn4FbvwA3bHlWx5jjV0Ew1zzEoc39uDbcju0vqIsInmXLuZOTwtJ6tVJjk0AUBQNbk4wpr7NqLGsdbBAKCYkMpBTyvPdmFm2fXF2mOj-50PxT0HITE4T8VeJMMwwrWM2zl7Ll8NMXtTMwBcKndr4A88tkOE0GyQOxxA0iZ4G2hAZ6UNTl_XiyHt6bMMkLgFVV1Wq9NzvdFMoZd60UFoGzGb8btIjr-bL1LwCr6xGuRPJuhxuc2Hqn0Rjb39sDX2hssHvr9Qx6EFhEin0NyjM_sY4ii0UMkbHHA-C3zMsAuLZuvzH8Wj-UKTLMoS1lxJvMQD_ijiSnmgsdkGiyVkBaVOw1KCDvaBfKbj0mefuu7ShQnWyDiBbdeLWtvTGdWUB9N4ZjiuuyYDIST3clffAIckcJmPngcKResMiILqUutwpzDs7WjPQn9EfpI_stiD8MnI5x2T7Si6fKOkapOXp_WwOJ8_nCaZd_st3ghJCtQ3hDGdUaCVlOLGgkOGXbXZfbpd7pVTW6aiCBw8obHnwe-VXSxM4kh7_j8ZAc__PknmI6RYLIWWAFtGh-F5_jZHaThN8dY6BWe1962m_v865zg_pCQkcllLiJBuJSmYeBuICm-YqjbMLahs3HJgzo1M5cqNXALFvQgl0WL4RvucqEtrtYX5SyHgWi9mj9GY",
    "expiresIn": "1d",
    "user": {
        "id": "6085aab3253d62474bc59a01",
        "name": "awais",
        "username": "awais",
        "email": "email@gmail.com",
        "balance": 0,
        "img": ""
    }
}

Errors

{
    "message": "Incorrect username or password! Please try again."
}