---
title: Authenticate via ClientUserId (Third Party)
slug: docs/demo/authenticate-via-clientuserid-third-party
description: Learn how to authenticate a client user on the fictive.com API with this code example. Utilizing the curl command, the document provides step-by-step instructions, including the required headers and data for a successful POST request. Elevate your API aut
docTags: 
createdAt: 2022-03-21T20:12:45.000Z
---

{
  "id": "S-uDwIIIEwyHpS7bgQpRm",
  "data": {
    "url": "https://api.fictive.com/REST/api/accounts/authenticate/{clientUserId}",
    "name": "Authenticate via ClientUserId (Third Party)",
    "method": "POST",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "clientUserId",
          "type": "string",
          "description": "Client user id"
        }
      ],
      "queryParameters": [],
      "headerParameters": [
        {
          "kind": "optional",
          "name": "X-TokenId",
          "type": "string",
          "description": "The eSuite Token Id"
        },
        {
          "kind": "optional",
          "name": "X-SessionId",
          "type": "string",
          "description": "The eSuite Session Id"
        },
        {
          "kind": "required",
          "name": "X-Version",
          "type": "string",
          "description": "The eSuite Version"
        },
        {
          "kind": "optional",
          "name": "Origin",
          "type": "string",
          "description": "The eSuite Origin"
        }
      ],
      "bodyDataParameters": [
        {
          "kind": "required",
          "name": "accountParamaters",
          "type": "array",
          "schema": [
            {
              "kind": "optional",
              "name": "parameterId",
              "type": "integer<int32>",
              "example": 0,
              "description": "Parameter id"
            },
            {
              "kind": "optional",
              "name": "name",
              "type": "string",
              "example": "",
              "description": "Parameter name"
            },
            {
              "kind": "optional",
              "name": "value",
              "type": "string",
              "example": "",
              "description": "Parameter value"
            },
            {
              "kind": "optional",
              "name": "isClientUserId",
              "type": "boolean",
              "example": "",
              "description": "Indicates wether the parameter is a client user id"
            }
          ],
          "modelRef": "#/definitions/FictiveGlobal.Api.Rest.Dtos.v1.AccountDetailParameter",
          "customType": "FictiveGlobal.Api.Rest.Dtos.v1.AccountDetailParameter[]",
          "isExpanded": true,
          "description": "Account detail parameter"
        }
      ],
      "formDataParameters": []
    },
    "responses": [
      {
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "schema": [
              {
                "kind": "optional",
                "name": "accountReference",
                "type": "string",
                "example": "",
                "description": "Account reference"
              },
              {
                "kind": "optional",
                "name": "status",
                "type": "string<None | Active | Suspended | Closed | MWalletInactive>",
                "example": "",
                "description": "Status of account"
              },
              {
                "kind": "optional",
                "name": "verified",
                "type": "boolean",
                "example": "",
                "description": "Flag that marks if the account has been verified"
              },
              {
                "kind": "optional",
                "name": "email",
                "type": "string",
                "example": "",
                "description": "Email of account"
              },
              {
                "kind": "optional",
                "name": "clientUserId",
                "type": "string",
                "example": "",
                "description": "Client Id of the user"
              },
              {
                "kind": "optional",
                "name": "salutation",
                "type": "string",
                "example": ""
              },
              {
                "kind": "optional",
                "name": "firstName",
                "type": "string",
                "example": "",
                "description": "Account first name"
              },
              {
                "kind": "optional",
                "name": "lastName",
                "type": "string",
                "example": "",
                "description": "Account last name"
              },
              {
                "kind": "optional",
                "name": "phoneNumber",
                "type": "string",
                "example": "",
                "description": "Account phone number"
              },
              {
                "kind": "optional",
                "name": "mobileNumber",
                "type": "string",
                "example": "",
                "description": "Account mobile number"
              },
              {
                "kind": "optional",
                "name": "dateOfBirth",
                "type": "string<date-time>",
                "example": "2021-09-21T05:33:11.8071496",
                "description": "Date of birth of the Account"
              },
              {
                "kind": "optional",
                "name": "gender",
                "type": "string<NotKnown | Female | Male>",
                "example": "",
                "description": "Gender"
              },
              {
                "kind": "optional",
                "name": "addresses",
                "type": "array",
                "schema": [
                  {
                    "kind": "optional",
                    "name": "addressType",
                    "type": "string<Home | Billing | Invoice>",
                    "example": "",
                    "description": "Address type"
                  },
                  {
                    "kind": "optional",
                    "name": "houseName",
                    "type": "string",
                    "example": "",
                    "description": "House name"
                  },
                  {
                    "kind": "optional",
                    "name": "houseNumber",
                    "type": "string",
                    "example": "",
                    "description": "House number"
                  },
                  {
                    "kind": "optional",
                    "name": "street",
                    "type": "string",
                    "example": "",
                    "description": "Street name"
                  },
                  {
                    "kind": "optional",
                    "name": "townCity",
                    "type": "string",
                    "example": "",
                    "description": "Name of town city"
                  },
                  {
                    "kind": "optional",
                    "name": "district",
                    "type": "string",
                    "example": "",
                    "description": "Name of district"
                  },
                  {
                    "kind": "optional",
                    "name": "state",
                    "type": "string",
                    "example": "",
                    "description": "State"
                  },
                  {
                    "kind": "optional",
                    "name": "county",
                    "type": "string",
                    "example": "",
                    "description": "County"
                  },
                  {
                    "kind": "optional",
                    "name": "postCode",
                    "type": "string",
                    "example": "",
                    "description": "Post code"
                  },
                  {
                    "kind": "optional",
                    "name": "country",
                    "type": "string",
                    "example": "",
                    "description": "Country"
                  },
                  {
                    "kind": "optional",
                    "name": "isDefault",
                    "type": "boolean",
                    "example": "",
                    "description": "Is default"
                  }
                ],
                "modelRef": "#/definitions/FictiveGlobal.Api.Rest.Dtos.v1.Address",
                "customType": "FictiveGlobal.Api.Rest.Dtos.v1.Address[]",
                "description": "Addresses of Account"
              },
              {
                "kind": "optional",
                "name": "customParameters",
                "type": "object",
                "schema": [],
                "example": {},
                "description": "Custom parameters"
              },
              {
                "kind": "optional",
                "name": "sessionToken",
                "type": "string",
                "example": "",
                "description": "The session token"
              },
              {
                "kind": "optional",
                "name": "marketingAllowed",
                "type": "boolean",
                "example": "",
                "description": "Marketing Allowed"
              }
            ],
            "modelRef": "#/definitions/FictiveGlobal.Api.Rest.Dtos.v3.AccountResult",
            "customType": "FictiveGlobal.Api.Rest.Dtos.v3.AccountResult",
            "isExpanded": true,
            "description": "Account"
          }
        ],
        "isExpanded": true,
        "statusCode": "200",
        "description": "OK",
        "jsonExample": "{\n  \"accountReference\": \"accRef\",\n  \"status\": \"Active\",\n  \"verified\": true,\n  \"email\": \"Email\",\n  \"clientUserId\": \"ClientUserId\",\n  \"salutation\": \"Salutation\",\n  \"firstName\": \"FirstName\",\n  \"lastName\": \"LastName\",\n  \"phoneNumber\": \"PhoneNumber\",\n  \"mobileNumber\": \"MobileNumber\",\n  \"dateOfBirth\": \"2021-09-21T05:33:12.447787\",\n  \"gender\": \"NotKnown\",\n  \"addresses\": [\n    {\n      \"addressType\": \"Home\",\n      \"houseName\": \"HouseName\",\n      \"houseNumber\": \"HouseNumber\",\n      \"street\": \"Street\",\n      \"townCity\": \"TownCity\",\n      \"district\": \"District\",\n      \"state\": \"State\",\n      \"county\": \"County\",\n      \"postCode\": \"PostCode\",\n      \"country\": \"Country\"\n    }\n  ],\n  \"customParameters\": {\n    \"ParameterName\": \"ParameterValue\"\n  },\n  \"sessionToken\": \"5f4ff896b0e043b693382154cb9100b3\",\n  \"marketingAllowed\": true\n}"
      },
      {
        "isExpanded": true,
        "statusCode": "401",
        "description": "Not Authorized",
        "jsonExample": ""
      },
      {
        "isExpanded": true,
        "statusCode": "404",
        "description": "Not Found.",
        "jsonExample": ""
      },
      {
        "isExpanded": true,
        "statusCode": "500",
        "description": "Internal Server Error",
        "jsonExample": ""
      }
    ],
    "contentType": "application/json",
    "description": "This endpoint provides the ability to authenticate using an external system value.\r\n             Upon successful authentication, the account profile will be returned alongside a valid session token.",
    "examples": {
      "languages": [
        {
          "id": "PJqBL5AxkfhwhbD-gAIoB",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url https://api.fictive.com/REST/api/accounts/authenticate/{clientUserId} \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --header 'x-version: string' \\\n     --data '[\n     {}\n     ]'"
        },
        {
          "id": "e-lkIxBdw-C4MUdxD9xRD",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\nmyHeaders.append(\"x-version\", \"string\");\n\nvar raw = JSON.stringify([\n   {}\n]);\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"https://api.fictive.com/REST/api/accounts/authenticate/{clientUserId}\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "eJ0jEurHw-GBXRDq9A2v3",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.fictive.com/REST/api/accounts/authenticate/{clientUserId}\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\nrequest[\"x-version\"] = \"string\"\nrequest.body = JSON.dump([\n   {}\n])\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "aNGqbxedbPbqwJ4suAckq",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.fictive.com/REST/api/accounts/authenticate/{clientUserId}\"\n\npayload = json.dumps([\n   {}\n])\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json',\n   'x-version': 'string'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "PJqBL5AxkfhwhbD-gAIoB"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "{\n  \"accountReference\": \"accRef\",\n  \"status\": \"Active\",\n  \"verified\": true,\n  \"email\": \"Email\",\n  \"clientUserId\": \"ClientUserId\",\n  \"salutation\": \"Salutation\",\n  \"firstName\": \"FirstName\",\n  \"lastName\": \"LastName\",\n  \"phoneNumber\": \"PhoneNumber\",\n  \"mobileNumber\": \"MobileNumber\",\n  \"dateOfBirth\": \"2021-09-21T05:33:12.447787\",\n  \"gender\": \"NotKnown\",\n  \"addresses\": [\n    {\n      \"addressType\": \"Home\",\n      \"houseName\": \"HouseName\",\n      \"houseNumber\": \"HouseNumber\",\n      \"street\": \"Street\",\n      \"townCity\": \"TownCity\",\n      \"district\": \"District\",\n      \"state\": \"State\",\n      \"county\": \"County\",\n      \"postCode\": \"PostCode\",\n      \"country\": \"Country\"\n    }\n  ],\n  \"customParameters\": {\n    \"ParameterName\": \"ParameterValue\"\n  },\n  \"sessionToken\": \"5f4ff896b0e043b693382154cb9100b3\",\n  \"marketingAllowed\": true\n}"
        },
        {
          "id": "response-1-401",
          "language": "401",
          "code": "// Not Authorized\n"
        },
        {
          "id": "response-2-404",
          "language": "404",
          "code": "// Not Found.\n"
        },
        {
          "id": "response-3-500",
          "language": "500",
          "code": "// Internal Server Error\n"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "type": "api-oas-v2",
  "children": [
    {
      "text": ""
    }
  ]
}