---
title: Get User Data
slug: get-user-data
docTags: 
createdAt: 2022-12-01T15:35:29.000Z
---

The OAuth process exchanges some data with Pathfix during the OAuth process. This data is accessible using this API.

The tokens are not shared.







:::ApiMethodV2
```json
{
  "tab": "request",
  "url": "https://labs.pathfix.com/api/connection/{{provider}}/userdata",
  "name": "Get User Data",
  "method": "GET",
  "request": {
    "pathParameters": [],
    "queryParameters": [
      {
        "kind": "required",
        "name": "user_id",
        "type": "string",
        "description": "Identifier of your currently logged in user"
      },
      {
        "kind": "required",
        "name": "public_key",
        "type": "string",
        "description": "Your Pathfix Application's Public Key"
      },
      {
        "kind": "required",
        "name": "private_key",
        "type": "string",
        "description": "Your Pathfix Application's Private Key"
      },
      {
        "kind": "optional",
        "name": "oauthId",
        "type": "string",
        "description": "Optional if you are providing the user_id"
      }
    ],
    "headerParameters": [],
    "bodyDataParameters": [],
    "formDataParameters": []
  },
  "results": {
    "languages": [
      {
        "id": "FFaCW8nGTCctUaBgtg50S",
        "code": "{\n\t\"rows\": [{\n\t\t\"pincStatus\": \"success\",\n\t\t\"callId\": \"9333921d-5175-4eed-ab19-3c260d23fdsfdf\",\n\t\t\"data\": {\n\t\t\t\"property\":\"value\"\n\t\t}\n\t}]\n}",
        "language": "200"
      },
      {
        "id": "BYRBEgNOdmAF6yNbYopwR",
        "code": "Unauthorized",
        "language": "401"
      }
    ],
    "selectedLanguageId": "FFaCW8nGTCctUaBgtg50S"
  },
  "examples": {
    "languages": [
      {
        "id": "5JJntRL7Q_vfnGqo6M5Kj",
        "code": "curl --request GET\n  --url https://labs.pathfix.com/api/connection/{{provider}}/userdata \n  --header 'Accept: application/json'",
        "language": "curl"
      },
      {
        "id": "IG5IOSMmQSOBQaYUJcPt3",
        "code": "fetch(\"https://labs.pathfix.com/api/connection/{{provider}}/userdata\", {\n  \"method\": \"GET\",\n  \"headers\": {\n    \"Accept\": \"application/json\"\n  }\n})\n.then(response => {\n  console.log(response);\n})\n.catch(err => {\n  console.error(err);\n});",
        "language": "javascript"
      },
      {
        "id": "UO7z0O_5273HMOctDdO40",
        "code": "const fetch = require('node-fetch');\n\nlet url = 'https://labs.pathfix.com/api/connection/{{provider}}/userdata';\nlet options = {\n  method: 'GET', \nheaders: {\n    Accept: 'application/json',\n  }\n};\nfetch(url, options)\n  .then(res => res.json())\n  .then(json => console.log(json))\n  .catch(err => console.error('error:' + err));",
        "language": "nodejs"
      },
      {
        "id": "XD9dlnLWY5YDG6Hgf4GAq",
        "code": "import requests\n\nurl = \"https://labs.pathfix.com/api/connection/{{provider}}/userdata\"\nheaders = {\"Accept\": \"application/json\"}\nresponse = requests.request(\"GET\", url, headers=headers)\nprint(response.text)",
        "language": "python"
      },
      {
        "id": "dJKiT3rzU5KR6MkHtgoCL",
        "code": "const fetch = require('node-fetch');\n\nlet url = 'https://labs.pathfix.com/api/connection/{{provider}}/userdata';\nlet options = {method: 'GET', headers: {Accept: 'application/json'}};\nfetch(url, options)\n  .then(res => res.json())\n  .then(json => console.log(json))\n  .catch(err => console.error('error:' + err));",
        "language": "ruby"
      }
    ],
    "selectedLanguageId": "5JJntRL7Q_vfnGqo6M5Kj"
  },
  "description": "This API will give you access to all the virtual connections for a specific user\n",
  "currentNewParameter": {
    "label": "Query Parameter",
    "value": "queryParameters"
  },
  "autoGeneratedAnchorSlug": "get-user-data",
  "legacyHash": "KZuXrFtywExf8IqpBetSh"
}
```
:::



