# 會員登入
**API 修改紀錄**
|版本|日期|備註|
| ------------ |------------ |------------ |
| v1 |2024/02/06 | 發佈 |
| v1.1 |2024/04/09 | 新增訪客登入 |
| v1.2 |2024/04/18 | 如果is_forgot是1就是忘記密碼後登入 |
| <font color="#f00">v1.3 |<font color="#f00">2024/12/13 | <font color="#f00">加上is_email false為沒有email帳號 |
**會員登入**
#### 網址
https://{domain}/api/v1/member/login
#### Http Method
POST
#### HTTP Header
accept-language : language code
apikey : apk key
#### HTTP Request Body 傳入參數
|欄位名稱|必填|型態|欄位|備註|
| ------------ | :-----------: |:-----------: |------------ |------------ |
|account |Y |string |帳號 |email/google_id/apple_id/guest_id |
|login_type |Y |string | 類型|account/google/apple/guest |
|password |* |string |密碼 |如為account必填 |
#### HTTP Response 回傳參數
|Name|Type|說明|
| ------------ | ------------ |------------ |
|id |int |ID |
|account |string |會員帳號 |
|name |string |會員名字 |
|avatar |string |大頭照圖檔位置 |
|birthday |string |生日 |
|gender |int |0:未設定/1:男/2:女 |
|certificate_photos |array |證照圖檔位置 |
|token |string |認證Token |
|is_forgot |int |1:忘記密碼後登入|
|<font color="#f00">is_email |boolean |<font color="#f00">false:沒有email帳號|
#### Request Header Authoriztion
```json
{
"accept-language" : "en", //or 'zh_tw'
"apikey" : "api key string"
}
```
#### Json Example
Request Json
```json
{
"account": "mingo.tsai@bremsinn.com",
"login_type": "account",
"password": "12345678"
}
```
Response Json Success
```json
{
"status": true,
"code": 200,
"message": "登入成功",
"result": {
"id": 1,
"status": true,
"name": "Mingo",
"gender": 1,
"birthday": "2024-01-06",
"account": "mingo.tsai@bremsinn.com",
"apple_id": "....",
"google_id": "....",
"email": "mingo.tsai@bremsinn.com",
"avatar": "https://....",
"is_forgot":1,
"certificate_photos": [
"https://....",
"https://...."
],
"token": "token string",
"is_email":true,
}
}
```
Response Json Error
```json
{
"status": false,
"message": "登入失敗,帳號或密碼錯誤",
"code": 400
}
```