---
title: Application Token Basic + Pin
slug: kronpam-api-collection-350/application-token-basic-pin
docTags: 
createdAt: 2024-07-22T09:58:47.222Z
---

{
  "id": "VVZNr2IykeFCypGre7fLQ",
  "type": "api-oas-v2",
  "data": {
    "method": "GET",
    "url": "{{url}}/sc-aapm-ui/rest/aapm/password?passwordExpirationInMinute=30&passwordChangeRequired=false&comment=COMMENT&token=TOKEN&sapmAccountPath=ACCOUNT_PATH&sapmAccountName=ACCOUNT_NAME&pin=PIN&responseType=JSON or default",
    "name": "",
    "description": "<p>This method gives the secret data of bound Vault account.<br>\nFor Application Token accounts which are bound to a single Vault account, the parameters sapmAccountPath and sapmAccountName are not needed.<br>\nFor Application Token accounts which are bount to multiple Vault accounts&#x26;groups the user must have set sapmAccountPath and sapmAccountName parameters together with the token.<br>\nThis method should be used only if the authentication level is set to BASIC + PIN. KRON PAM shares the PIN after first request to the pre-defined Port of the user.<br>\nresponseType=JSON parameter returns the response as JSON. If this parameter is not set, the return type for dynamic accounts are plain text.</p>",
    "contentType": "application/json",
    "request": {
      "headerParameters": [
        {
          "name": "Content-Type",
          "description": "",
          "default": "application/json",
          "value": "application/json",
          "type": "string"
        },
        {
          "name": "X-XSRF-TOKEN",
          "description": "",
          "default": "{{csrftoken}}",
          "value": "{{csrftoken}}",
          "type": "string"
        }
      ],
      "queryParameters": [
        {
          "name": "passwordExpirationInMinute",
          "description": "",
          "default": "30",
          "value": "30",
          "type": "string"
        },
        {
          "name": "passwordChangeRequired",
          "description": "",
          "default": "false",
          "value": "false",
          "type": "string"
        },
        {
          "name": "comment",
          "description": "",
          "default": "COMMENT",
          "value": "COMMENT",
          "type": "string"
        },
        {
          "name": "token",
          "description": "",
          "default": "TOKEN",
          "value": "TOKEN",
          "type": "string"
        },
        {
          "name": "sapmAccountPath",
          "description": "<p>If there is only 1 Vault Account related to the token, this param. can be null</p>",
          "default": "ACCOUNT_PATH",
          "value": "ACCOUNT_PATH",
          "type": "string"
        },
        {
          "name": "sapmAccountName",
          "description": "<p>If there is only 1 Vault Account related to the token, this param. can be null</p>",
          "default": "ACCOUNT_NAME",
          "value": "ACCOUNT_NAME",
          "type": "string"
        },
        {
          "name": "pin",
          "description": "",
          "default": "PIN",
          "value": "PIN",
          "type": "string"
        },
        {
          "name": "responseType",
          "description": "User has to set this parameter to JSON if JSON response is needed.",
          "default": "JSON or default",
          "value": "JSON or default",
          "type": "string"
        }
      ],
      "pathParameters": [
        {
          "name": "url",
          "description": "",
          "default": "url",
          "value": "url",
          "type": "string"
        }
      ],
      "bodyDataParameters": [],
      "formDataParameters": [],
      "oAuthParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "",
        "jsonExample": ""
      }
    ],
    "examples": {
      "languages": [
        {
          "id": "q5b1GuhxXvlwoBsXJp5ce",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request GET \\\n     --url '{{url}}/sc-aapm-ui/rest/aapm/password?passwordExpirationInMinute=30&passwordChangeRequired=false&comment=COMMENT&token=TOKEN&sapmAccountPath=ACCOUNT_PATH&sapmAccountName=ACCOUNT_NAME&pin=PIN&responseType=JSON%20or%20default&passwordExpirationInMinute=30&passwordChangeRequired=false&comment=COMMENT&token=TOKEN&sapmAccountPath=ACCOUNT_PATH&sapmAccountName=ACCOUNT_NAME&pin=PIN&responseType=JSON%20or%20default' \\\n     --header 'accept: application/json' \\\n     --header 'x-xsrf-token: {{csrftoken}}'"
        },
        {
          "id": "XiZTk1OUWSOhmhbEMe3f_",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\nmyHeaders.append(\"x-xsrf-token\", \"{{csrftoken}}\");\n\nvar requestOptions = {\n   method: 'GET',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"{{url}}/sc-aapm-ui/rest/aapm/password?passwordExpirationInMinute=30&passwordChangeRequired=false&comment=COMMENT&token=TOKEN&sapmAccountPath=ACCOUNT_PATH&sapmAccountName=ACCOUNT_NAME&pin=PIN&responseType=JSON or default&passwordExpirationInMinute=30&passwordChangeRequired=false&comment=COMMENT&token=TOKEN&sapmAccountPath=ACCOUNT_PATH&sapmAccountName=ACCOUNT_NAME&pin=PIN&responseType=JSON or default\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "LkxCzmE0PIvOxCEwrYsPC",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"{{url}}/sc-aapm-ui/rest/aapm/password?passwordExpirationInMinute=30&passwordChangeRequired=false&comment=COMMENT&token=TOKEN&sapmAccountPath=ACCOUNT_PATH&sapmAccountName=ACCOUNT_NAME&pin=PIN&responseType=JSON or default&passwordExpirationInMinute=30&passwordChangeRequired=false&comment=COMMENT&token=TOKEN&sapmAccountPath=ACCOUNT_PATH&sapmAccountName=ACCOUNT_NAME&pin=PIN&responseType=JSON or default\")\n\nhttp = Net::HTTP.new(url.host, url.port);\nrequest = Net::HTTP::Get.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\nrequest[\"x-xsrf-token\"] = \"{{csrftoken}}\"\n\nresponse = http.request(request)\nputs response.read_body\n"
        },
        {
          "id": "jgMLVBAQ4fC45DNRnRqQ2",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"{{url}}/sc-aapm-ui/rest/aapm/password?passwordExpirationInMinute=30&passwordChangeRequired=false&comment=COMMENT&token=TOKEN&sapmAccountPath=ACCOUNT_PATH&sapmAccountName=ACCOUNT_NAME&pin=PIN&responseType=JSON or default&passwordExpirationInMinute=30&passwordChangeRequired=false&comment=COMMENT&token=TOKEN&sapmAccountPath=ACCOUNT_PATH&sapmAccountName=ACCOUNT_NAME&pin=PIN&responseType=JSON or default\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json',\n   'x-xsrf-token': '{{csrftoken}}'\n}\n\nresponse = requests.request(\"GET\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "q5b1GuhxXvlwoBsXJp5ce"
    },
    "results": {
      "languages": [
        {
          "id": "3GS_XugSqh5bwCO2wqwR_",
          "language": "200",
          "code": ""
        }
      ],
      "selectedLanguageId": "3GS_XugSqh5bwCO2wqwR_"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}