# 會員註冊 **會員註冊流程,使用一般帳號註冊,EMAIL接收到驗證碼後,填入驗證** **如果有未驗證得已註冊帳號,會回應code:422 並給予member_id** **然後需導頁至驗證頁面並重新發送驗證碼** **API 修改紀錄** |版本|日期|備註| | ------------ |------------ |------------ | | v1 |2024/02/21| 發佈 | | v1.1 |2024/03/15| 移除暱稱 生日 性別 | | v1.2 |2024/04/09| 增加訪客註冊 | **會員註冊** #### 網址 https://{domain}/api/v1/member/register #### Http Method POST #### HTTP Header accept-language : language code apikey : apk key #### HTTP Request Body 傳入參數 |欄位名稱|必填|型態|欄位|備註| | ------------ | :-----------: |:-----------: |------------ |------------ | |account |Y |string |帳號 |email | |name |Y |string |姓名 | | |password |* |string |密碼 |如為一般account註冊必填, 最少八碼| |apple_id |N |string |apple ID ||apple綁定註冊使用 |google_id |N |string |google ID ||google綁定註冊使用 |guest_id |N |string |guest ID ||訪客帳號註冊使用 |avatar |N |string |個人照片 |可從google讀取存過來| #### HTTP Response 回傳參數 |Name|Type|說明| | ------------ | ------------ |------------ | |status |boolen |狀態 | |code |string |Response Code | |message |string |說明 | |result |int | 會員id | #### Request Header Authoriztion ```json { "accept-language" : "en", //or 'zh_tw' "apikey" : "api key string" } ``` #### Json Example Request Json ```json 一般註冊 { "name": "Jackson", "account": "mingo.tsai@bremsinn.com", "password":"1234qwer" } apple註冊 { "name": "Jackson", "account": "mingo.tsai@bremsinn.com", "apple_id":"123wefewgytl" } google註冊 { "name": "Jackson", "account": "mingo.tsai@bremsinn.com", "google_id":"hhel123123" } 訪客註冊 請使用 Version 4 UUID 範例:1443bbc2-801f-437d-b6cb-272349cfd08d { "name": "guest", "account": "1443bbc2-801f-437d-b6cb-272349cfd08d@guest", "guest_id":"1443bbc2-801f-437d-b6cb-272349cfd08d" } ``` Response Json Success ```json { "status": true, "code": 200, "message": "Store Data Success", "result": 31 } ``` Response Json Error ```json 帳號重複 { "status": false, "message": "帳號已存在", "code": 400 } ``` ```json 暱稱未填 { "status": false, "code": 422, "message": "傳送參數有誤(請輸入暱稱)", "result": null } ``` ```json 密碼規則 { "status": false, "code": 422, "message": "傳送參數有誤(密碼最少八碼)", "result": null } ``` ```json 帳號已存在 但未註冊 回傳member_id { "status": true, "code": 422, "message": "email no verify", "result": 8 } ``` ```json uuid錯誤 { "status": false, "message": "帳號錯誤", "code": 400 } ```