Spotlight
    • Dark
      Light
    • PDF

    Spotlight

    • Dark
      Light
    • PDF

    Article summary

    Get
    /api/v1/spotlight

    Searches for users or rooms that are visible to the user. It will only return rooms that user didn't join yet.

    Changelog

    VersionDescription
    0.64.0Added support to '#' and '@' searches, for channels and users respectively.
    0.61.0Added
    Header parameters
    X-Auth-Token
    stringRequired

    The authToken of the authenticated user.

    ExampleRScctEHSmLGZGywfIhWyRpyofhKOiMoUIpimhvheU3f
    X-User-Id
    stringRequired

    The userId of the authenticated user.

    ExamplerbAXPnMktTFbNpwtJ
    Query parameters
    query
    stringRequired

    The term to be searched. Supports '#' for channels and '@' for users

    Examplejohn
    Responses
    200

    OK

    Success
    {
      "users": [
        {
          "_id": "rocket.cat",
          "name": "Rocket.Cat",
          "username": "rocket.cat",
          "status": "online",
          "avatarETag": "5BB9B5ny5DkKdrwkq"
        }
      ],
      "rooms": [],
      "success": true
    }
    Expand All
    object
    users
    Array of object
    object
    _id
    string
    name
    string
    username
    string
    status
    string
    avatarETag
    string
    rooms
    Array of object
    object
    success
    boolean
    401

    Unauthorized

    Authorization Error
    {
      "status": "error",
      "message": "You must be logged in to do this."
    }
    object
    status
    string
    message
    string

    Was this article helpful?

    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.