---
title: AAPM Basic + Pin
slug: single-connect-api-3-0-3/aapm-basic-pin
description: Learn how to make a successful GET request using the curl command with this comprehensive code example. Understand the essential parameters to include, such as URL, password expiration time, password change requirement, comment, token, SAPM account path, 
docTags: 
createdAt: 2022-11-10T14:21:49.000Z
---

{
  "id": "g3lt0Xw6GvKzqpzeRICAC",
  "data": {
    "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",
    "method": "GET",
    "request": {
      "pathParameters": [],
      "queryParameters": [
        {
          "name": "passwordExpirationInMinute",
          "type": "string",
          "example": "30",
          "description": ""
        },
        {
          "name": "passwordChangeRequired",
          "type": "string",
          "example": "false",
          "description": ""
        },
        {
          "name": "comment",
          "type": "string",
          "example": "COMMENT",
          "description": ""
        },
        {
          "name": "token",
          "type": "string",
          "example": "TOKEN",
          "description": ""
        },
        {
          "name": "sapmAccountPath",
          "type": "string",
          "example": "ACCOUNT_PATH",
          "description": "<p>If there is only 1 SAPM Account related to the token, this param. can be null</p>"
        },
        {
          "name": "sapmAccountName",
          "type": "string",
          "example": "ACCOUNT_NAME",
          "description": "<p>If there is only 1 SAPM Account related to the token, this param. can be null</p>"
        },
        {
          "name": "pin",
          "type": "string",
          "example": "PIN",
          "description": ""
        },
        {
          "name": "responseType",
          "type": "string",
          "example": "JSON or default",
          "description": "User has to set this parameter to JSON if JSON response is needed."
        }
      ],
      "headerParameters": [
        {
          "name": "Content-Type",
          "type": "string",
          "example": "application/json",
          "description": ""
        },
        {
          "name": "X-XSRF-TOKEN",
          "type": "string",
          "example": "{{csrftoken}}",
          "description": ""
        }
      ],
      "bodyDataParameters": [
        {
          "name": "body",
          "type": "string",
          "example": "",
          "description": ""
        }
      ],
      "formDataParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "",
        "jsonExample": ""
      }
    ],
    "contentType": "application/json",
    "description": "<p>This method gives the secret data of bound SAPM account.\r\nFor AAPM accounts which are bound to a single SAPM account, the parameters sapmAccountPath and sapmAccountName are not needed.\r\nFor AAPM accounts which are bount to multiple SAPM accounts&#x26;groups the user must have set sapmAccountPath and sapmAccountName parameters together with the token.\r\nThis method should be used only if the authentication level is set to BASIC + PIN. Single Connect shares the PIN after first request to the pre-defined Port of the user.\r\nresponseType=JSON parameter returns the response as JSON. If this parameter is not set, the return type for dynamic accounts are plain text.</p>",
    "examples": {
      "languages": [
        {
          "id": "g_6Q8gu_SgzrNdDn5ZZ0a",
          "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' \\\n     --header 'accept: application/json'"
        },
        {
          "id": "bymQ0Qsw_ZET5Vmvx-5GH",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\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\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "QSfRaURpk_qr0y_euTtol",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\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\")\n\nhttp = Net::HTTP.new(url.host, url.port);\nrequest = Net::HTTP::Get.new(url)\nrequest[\"accept\"] = \"application/json\"\n\nresponse = http.request(request)\nputs response.read_body\n"
        },
        {
          "id": "36CH5qvXnmwYXohWAWkCO",
          "language": "python",
          "label": "Python",
          "code": "import requests\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\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json'\n}\n\nresponse = requests.request(\"GET\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "g_6Q8gu_SgzrNdDn5ZZ0a"
    },
    "results": {
      "languages": [
        {
          "id": "zQYjPoTRAQKvm2fSDHYW0",
          "language": "200",
          "code": ""
        }
      ],
      "selectedLanguageId": "zQYjPoTRAQKvm2fSDHYW0"
    }
  },
  "type": "api-oas-v2",
  "children": [
    {
      "text": ""
    }
  ]
}