---
title: GET /users
slug: get-users
description: This document includes code examples in Curl, Node.js, Python, and Ruby for making GET requests to obtain user data. Learn how to retrieve information such as names, email addresses, profiles, access levels, public keys, and last active times from a JSON 
docTags: 
createdAt: 2023-08-14T01:18:22.074Z
---

El documento proporciona ejemplos de código en tres lenguajes de programación (Curl, Node.js, Python y Ruby) para realizar una solicitud GET para obtener datos de los usuarios.&#x20;

La respuesta a la solicitud es un objeto JSON que contiene información sobre los usuarios, como sus nombres, direcciones de correo electrónico, perfiles, niveles de acceso, claves públicas y últimos tiempos de actividad.

:::ApiMethodV2
```json
{
  "name": "GET /users  ",
  "method": "GET",
  "url": "https://api.asisteclick.com/v2/users",
  "description": "Listado de usuarios",
  "tab": "examples",
  "examples": {
    "languages": [
      {
        "id": "GyroMxeATn1AflQJhjavA",
        "language": "curl",
        "code": "curl --location --request GET 'https://api.asisteclick.com/v2/users' \\\n--header 'Accept: application/json' \\\n--header 'Content-Type: application/json'",
        "customLabel": ""
      },
      {
        "id": "r_5cEYKkXOfa_2bHbmyKX",
        "language": "nodejs",
        "code": "var request = require('request');\nvar options = {\n   'method': 'GET',\n   'url': 'https://api.asisteclick.com/v2/users',\n   'headers': {\n      'Accept': 'application/json',\n      'Content-Type': 'application/json'\n   }\n};\nrequest(options, function (error, response) {\n   if (error) throw new Error(error);\n   console.log(response.body);\n});\n",
        "customLabel": ""
      },
      {
        "id": "Uov3c9pRZVq_g4Q5vS55z",
        "language": "python",
        "code": "import requests\nimport json\n\nurl = \"https://api.asisteclick.com/v2/users\"\n\npayload={}\nheaders = {\n   'Accept': 'application/json',\n   'Content-Type': 'application/json'\n}\n\nresponse = requests.request(\"GET\", url, headers=headers, data=payload)\n\nprint(response.text)\n",
        "customLabel": ""
      },
      {
        "id": "vwWws8k4WyW0CxkRedKNd",
        "language": "ruby",
        "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.asisteclick.com/v2/users\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Accept\"] = \"application/json\"\nrequest[\"Content-Type\"] = \"application/json\"\n\nresponse = https.request(request)\nputs response.read_body\n",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "GyroMxeATn1AflQJhjavA"
  },
  "results": {
    "languages": [
      {
        "id": "gbKjwNfPQOCmf74VxtajM",
        "language": "200",
        "customLabel": "",
        "code": "{\n  \"code\": 200,\n  \"error\": 0,\n  \"message\": \"List of users\",\n  \"data\": [\n    {\n      \"id\": \"351541\",\n      \"name\": \"John D.\",\n      \"email\": \"john@miller.com\",\n      \"profile\": \"collaborator\",\n      \"access_level\": \"super\",\n      \"public_key\": \"rGhIadfDADF234vUfYl3iDg6VHOk459\",\n      \"last_active_time\": \"2022-10-26 06:29:07\"\n    },\n    {\n      \"id\": \"5320199\",\n      \"name\": \"Susana M.\",\n      \"email\": \"susana@miller.com\",\n      \"profile\": \"collaborator\",\n      \"access_level\": \"user\",\n      \"public_key\": \"FQOPRqDSadf32y43Gn5fdN9Ck8ErZm7\",\n      \"last_active_time\": \"1970-01-01 00:00:00\"\n    }\n  ]\n}"
      }
    ],
    "selectedLanguageId": "gbKjwNfPQOCmf74VxtajM"
  },
  "request": {
    "pathParameters": [],
    "queryParameters": [],
    "headerParameters": [
      {
        "name": "token",
        "kind": "required",
        "type": "string",
        "description": "Token de acceso",
        "children": []
      }
    ],
    "bodyDataParameters": [],
    "formDataParameters": []
  },
  "currentNewParameter": {
    "label": "Header Parameter",
    "value": "headerParameters"
  },
  "autoGeneratedAnchorSlug": "get-users",
  "legacyHash": "O5EEnX3D4OOmhkewt6NCA"
}
```
:::

:::ApiMethodV2
```json
{
  "name": "GET /users/:userid",
  "method": "GET",
  "url": "https://api.asisteclick.com/v2/users/:userid",
  "description": "Datos de un usuario",
  "tab": "examples",
  "examples": {
    "languages": [
      {
        "id": "WfCVA5EX27Ur3j4KH7zgH",
        "language": "curl",
        "code": "curl --location --request GET 'https://api.asisteclick.com/v2/users/:userid' \\\n--header 'Accept: application/json' \\\n--header 'Content-Type: application/json'",
        "customLabel": ""
      },
      {
        "id": "87maNHtibniQGPuM0VfV8",
        "language": "nodejs",
        "code": "var request = require('request');\nvar options = {\n   'method': 'GET',\n   'url': 'https://api.asisteclick.com/v2/users/:userid',\n   'headers': {\n      'Accept': 'application/json',\n      'Content-Type': 'application/json'\n   }\n};\nrequest(options, function (error, response) {\n   if (error) throw new Error(error);\n   console.log(response.body);\n});\n",
        "customLabel": ""
      },
      {
        "id": "eqb7YqlpKD9Vjvgl6MH3A",
        "language": "python",
        "code": "import requests\nimport json\n\nurl = \"https://api.asisteclick.com/v2/users/:userid\"\n\npayload={}\nheaders = {\n   'Accept': 'application/json',\n   'Content-Type': 'application/json'\n}\n\nresponse = requests.request(\"GET\", url, headers=headers, data=payload)\n\nprint(response.text)\n",
        "customLabel": ""
      },
      {
        "id": "G9EyQd6yf6y8RKsNfc88e",
        "language": "ruby",
        "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.asisteclick.com/v2/users/:userid\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Accept\"] = \"application/json\"\nrequest[\"Content-Type\"] = \"application/json\"\n\nresponse = https.request(request)\nputs response.read_body\n",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "WfCVA5EX27Ur3j4KH7zgH"
  },
  "results": {
    "languages": [
      {
        "id": "gbKjwNfPQOCmf74VxtajM",
        "language": "200",
        "customLabel": "",
        "code": "{\n  \"code\": 200,\n  \"error\": 0,\n  \"message\": \"User info\",\n  \"data\": {\n    \"id\": \"351541\",\n    \"name\": \"John D.\",\n    \"email\": \"john@miller.com\",\n    \"profile\": \"collaborator\",\n    \"access_level\": \"super\",\n    \"public_key\": \"rGhIadfDADF234vUfYl3iDg6VHOk459\",\n    \"last_active_time\": \"2022-10-26 06:29:07\"\n  }\n}"
      }
    ],
    "selectedLanguageId": "gbKjwNfPQOCmf74VxtajM"
  },
  "request": {
    "pathParameters": [],
    "queryParameters": [],
    "headerParameters": [
      {
        "name": "token",
        "kind": "required",
        "type": "String",
        "description": "Token de acceso",
        "children": []
      }
    ],
    "bodyDataParameters": [],
    "formDataParameters": []
  },
  "currentNewParameter": {
    "label": "Query Parameter",
    "value": "queryParameters"
  },
  "autoGeneratedAnchorSlug": "get-usersuserid",
  "legacyHash": "TN1ibayQF462CrRzg44cc"
}
```
:::

