---
# System prepended metadata

title: postman 匯出登入API的差異比較

---

# postman 匯出登入API的差異比較

### 資料放在x-www-form-urlencoded
```json=
{
   "name":"登入",
   "event":[
      {
         "listen":"test",
         "script":{
            "exec":[
               ""
            ],
            "type":"text/javascript"
         }
      }
   ],
   "request":{
      "method":"POST",
      "header":[
         {
            "key":"Content-Type",
            "value":"application/x-www-form-urlencoded"
         }
      ],
      "body":{
         "mode":"urlencoded",
         "urlencoded":[
            {
               "key":"account",
               "value":"{{account}}",
               "description":"帳號",
               "type":"text"
            },
            {
               "key":"password",
               "value":"{{password}}",
               "description":"密碼",
               "type":"text"
            },
            {
               "key":"ao_sid",
               "value":"{{ao_sid}}",
               "description":"組織編號",
               "type":"text"
            }
         ]
      },
      "url":{
         "raw":"{{HOST}}/api/core/login",
         "host":[
            "{{HOST}}"
         ],
         "path":[
            "api",
            "core",
            "login"
         ]
      },
      "description":"輸入組織編號、使用者帳號、使用者密碼進行登入動作\n#### Request\n* **URL** : ```/api/core/login```\n* **URL parameters** :  \n  N/A\n* **Body** :  \n  | KEY | TYPE | DESCRIPTION |\n  | --- | --- | --- |\n  | account | string | 使用者帳號 |\n  | password | string | 使用者密碼 |\n  | ao_sid | int | 登入組織編號 |\n#### Response\n* **Body** :  \n  | KEY | TYPE | DESCRIPTION |\n  | --- | --- | --- |\n  | data | object | 登入資訊 |\n  | result | bool | API執行結果 <br> true : 成功 <br> false : 失敗 |\n  | code | int | 錯誤碼 <br> 0 : 成功 <br> 1 : 有必填的API參數沒給 <br> 2 : API執行失敗 |\n  | errmsg | string | 錯誤訊息 |\n \n **data parameters**  \n  | KEY | TYPE | DESCRIPTION |\n  | --- | --- | --- |\n  | iv | string | 初始化向量 |\n  | code | string | 登入資訊 |\n  | rest_cnt | int | 剩餘可嘗試登入次數，-1表示未進行次數限制 |\n  | unlock_time | DateTime? | 帳號解除鎖定的時間，帳號未被鎖定時回傳null |"
   },
   "response":[
      
   ]
}
```

### 資料放在BODY
```json=
{
   "name":"登入",
   "event":[
      {
         "listen":"test",
         "script":{
            "exec":[
               ""
            ],
            "type":"text/javascript"
         }
      }
   ],
   "request":{
      "method":"POST",
      "header":[
         {
            "key":"Content-Type",
            "value":"application/json"
         }
      ],
      "body":{
         "mode":"raw",
         "raw":"{\r\n    \"ao_sid\":{{ao_sid}},\r\n    \"account\":\"{{account}}\",\r\n    \"password\":\"{{password}}\"\r\n}",
         "options":{
            "raw":{
               "language":"json"
            }
         }
      },
      "url":{
         "raw":"{{HOST}}/api/core/login",
         "host":[
            "{{HOST}}"
         ],
         "path":[
            "api",
            "core",
            "login"
         ]
      },
      "description":"輸入組織編號、使用者帳號、使用者密碼進行登入動作\n#### Request\n* **URL** : ```/api/core/login```\n* **URL parameters** :  \n  N/A\n* **Body** :  \n  | KEY | TYPE | DESCRIPTION |\n  | --- | --- | --- |\n  | account | string | 使用者帳號 |\n  | password | string | 使用者密碼 |\n  | ao_sid | int | 登入組織編號 |\n\n#### Response\n* **Body** :  \n  | KEY | TYPE | DESCRIPTION |\n  | --- | --- | --- |\n  | data | object | 登入資訊 |\n  | result | bool | API執行結果 <br> true : 成功 <br> false : 失敗 |\n  | code | int | 錯誤碼 <br> 0 : 成功 <br> 1 : 有必填的API參數沒給 <br> 2 : API執行失敗 |\n  | errmsg | string | 錯誤訊息 |\n \n **data parameters**  \n  | KEY | TYPE | DESCRIPTION |\n  | --- | --- | --- |\n  | iv | string | 初始化向量 |\n  | code | string | 登入資訊 |\n  | rest_cnt | int | 剩餘可嘗試登入次數，-1表示未進行次數限制 |\n  | unlock_time | DateTime? | 帳號解除鎖定的時間，帳號未被鎖定時回傳null |"
   },
   "response":[
      
   ]
}
```