---
agentTools:
  projectIndex: https://leadforensics-api.readme.io/llms.txt
---

# GetClientPortalLogins

Returns a list of all Logins into the Lead Forensics Portal. This call replicates the result produced by the Login Report available within the Portal.

[block:callout]
{
  "type": "warning",
  "title": "Only Dates Considered",
  "body": "The parameters DateFrom and DateTo only consider the date part of the value, ignoring the time. \n\n<b>Example:</b>\nDateFrom = '11-09-2018 08:00:00'\nDateTo = '12-09-2018 17:59:59'\nResult = Will return all Login results from '11-09-2018 00:00:00' to '12-09-2018 23:59:59', matching the results shown in the Portal for that custom date range."
}
[/block]

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "API Settings",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://interact.leadforensics.com/WebApi_v2"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "in": "header",
        "name": "ClientID",
        "x-default": "45656"
      },
      "sec1": {
        "type": "apiKey",
        "in": "header",
        "name": "Authorization-Token",
        "x-default": "Zax4qjY5w3tmAlqJUajROgW"
      }
    }
  },
  "security": [
    {
      "sec0": [],
      "sec1": []
    }
  ],
  "paths": {
    "/Reference/GetClientPortalLogins": {
      "get": {
        "summary": "GetClientPortalLogins",
        "description": "",
        "operationId": "getclientportallogins",
        "parameters": [
          {
            "name": "datefrom",
            "in": "query",
            "description": "The date from where records are included. Only the date part will be considered.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "dateto",
            "in": "query",
            "description": "The date to where records are included. Only the date part will be considered.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pagesize",
            "in": "query",
            "description": "Number of records to return in a page of results",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 5
            }
          },
          {
            "name": "pageno",
            "in": "query",
            "description": "The particular page of results to return",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 1
            }
          },
          {
            "name": "Authorization-Token",
            "in": "header",
            "description": "You API key provided by Lead Forensics",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ClientID",
            "in": "header",
            "description": "Your unique Client Identifier provided by Lead Forensics.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{    \n    \"List\": [\n        {\n            \"Name\": \"Example User\",\n            \"Username\": \"exampleUser\",\n            \"Login\": \"2018-09-18T13:23:49\"\n        },\n        {\n            \"Name\": \"Example User\",\n            \"Username\": \"exampleUser\",\n            \"Login\": \"2018-09-19T11:23:40\"\n        }\n    ],\n    \"PageSize\": 5,\n    \"PageCount\": 1,\n    \"RecordCount\": 2,\n    \"CurrentPage\": 1\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "List": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "Name": {
                            "type": "string",
                            "example": "Example User"
                          },
                          "Username": {
                            "type": "string",
                            "example": "exampleUser"
                          },
                          "Login": {
                            "type": "string",
                            "example": "2018-09-18T13:23:49"
                          }
                        }
                      }
                    },
                    "PageSize": {
                      "type": "integer",
                      "example": 5,
                      "default": 0
                    },
                    "PageCount": {
                      "type": "integer",
                      "example": 1,
                      "default": 0
                    },
                    "RecordCount": {
                      "type": "integer",
                      "example": 2,
                      "default": 0
                    },
                    "CurrentPage": {
                      "type": "integer",
                      "example": 1,
                      "default": 0
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          }
        },
        "deprecated": false,
        "x-readme": {
          "code-samples": [
            {
              "language": "javascript",
              "code": "$.ajax({ \n  type: 'GET', \n  dataType: 'json', \n  url: 'https://interact.leadforensics.com/WebApi_v2/Reference/GetClientPortalLogins?datefrom=18-09-2018 00:00:00&dateto=19-09-2018 23:59:59&pagesize=5&pageno=1', \n  headers: {\n    'Authorization-Token': 'Zax4qjY5w3tmAlqJUajROgW',\n    'ClientID':'45656'\n  },\n  success: function (data) {  \n    if (data.List.length > 0) {\n      //we have Login records\n    }\n    else {\n      //we do not have any Login records\n    }\n  },  \n  error: function (err) {  \n    //ajax error trap  \n  }  \n});"
            }
          ],
          "samples-languages": [
            "javascript"
          ]
        }
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": false,
    "proxy-enabled": false
  },
  "x-readme-fauxas": true,
  "_id": "59970b303013510019572b1e:5b993747c6f31800034c7a4c"
}
```