# 企業會員員工登入驗證 Custos-EnterpriseAPP-API-000 V2.0 2023-08-11 Custos 企業會員之員工第一次使用 Enterprise APP,以簡訊進行登入驗證。企業會員之員工安裝Enterprise APP 後,第一次開啟時會顯示登入頁面,員工需填入與其所屬企業註冊員工資料時所使用一致的手機號碼,通過簡訊驗證完成登入。 [toc] ## 作業啟動 1. 傳入使用者自行選取之國家/地區之國碼 #country_code、會員手機號 #phone_num、APP 自動產生之【#簡訊驗證碼與文字內容】。 2. 記錄 SystemLog:#phone_num|登入|驗證開始 ## API 作業啟動 1. 參考使丹達呼叫三竹簡訊之 API,完成【#簡訊驗證碼與文字內容】發送。 以下為 APP 端作業: 2. 使用者以收到之簡訊驗證碼填入登入頁面,由 APP 進行比對。 3. 若簡訊驗證碼相符,執行 API-001;若不相符則跳出提示訊息:驗證碼不符 (Verification code does not match.)。 ## 作業結束 記錄 System Log:#phone_num|登入|驗證結束 ## 例外處理 若執行中有發生異常,將攔截到的 exception 訊息記錄 ErrorLog:[YYYYMMDDHHMMSS] EnterpriseAPP-API-000 發生異常:【#攔截到的 exception 訊息】 ## 規格及範例 |API No.|Enterprise-API-000| |-|-| |API Name|EmpAuth| |URL|${url}/APP/getData/EmpAuth| |Purpose|企業會員員工登入驗證| |Description|透過 API 進行使用者登入驗證| |Protocol|JSON over HTTP POST| |Content-Type|application/json| **Request** |參數|型態|必填|長度|說明| |-|-|:-:|:-:|-| |country_code|String|Y|10|國碼,使用者選取地區後帶入| |phone_num|String|Y|16|會員手機號碼,使用者輸入| |sms_message|String|Y||簡訊驗證碼與文字內容| **Response** |參數|型態|必回|說明| |-|-|:-:|-| |result|String|Y|API 執行結果,Y:成功, N:失敗| |message|String|N|API 執行失敗的訊息說明| **Request Sample** ```javascript var input = { "country_code": "65", "phone_num": "97480990", "sms_message": "Verification Code 12345, expire in 10 minutes." } ``` **Response Sample** ```javascript { "result": "Y", //API 結果,Result= Y 時才會有 data 資料 "message": "..." //API 訊息,Ex: "執行失敗, 原因: XXXXXXXXX" } ```
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up