v0.0.21
apea-proto
apea/base/v1/base.proto
Error
| Name | Number | Description |
|---|---|---|
| None | 0 | |
| TokenInvalid | 1001 | token無效 |
| IdentityInvalid | 1002 | 身分證不合規 |
| PhoneDuplicated | 1003 | 電話號碼重複註冊 |
| IsLocked | 1004 | 已被鎖定,禁止操作 |
| ClientNotFound | 1005 | 查無用戶紀錄 |
| TWIDInvalid | 1006 | TWID驗證失敗 |
| IdentityVerifiedButNotValid | 1007 | 該身分證已經過驗證,但驗證不通過 |
| PhoneExistButIdentityNotMatch | 1008 | 該電話號碼已有驗證紀錄,但輸入的身分證字號不符合紀錄 |
| ClientHasPhoneButInputNotMatch | 1009 | 該用戶有驗證紀錄,但輸入的電話號碼不符合 |
| ClientAlreadyExist | 1010 | 用戶已有驗證紀錄 |
| PhoneNotMatch | 1011 | 電話號碼不符 |
apea/health/v1/health.proto
HealthCheckRequest
| Field | Type | Label | Description |
|---|---|---|---|
| service | string |
HealthCheckResponse
| Field | Type | Label | Description |
|---|---|---|---|
| status | HealthCheckResponse.ServingStatus |
HealthCheckResponse.ServingStatus
| Name | Number | Description |
|---|---|---|
| SERVING_STATUS_UNSPECIFIED | 0 | |
| SERVING_STATUS_SERVING | 1 | |
| SERVING_STATUS_NOT_SERVING | 2 | |
| SERVING_STATUS_SERVICE_UNKNOWN | 3 | Used only by the Watch method. |
HealthService
| Method Name | Request Type | Response Type | Description |
|---|---|---|---|
| Check | HealthCheckRequest | HealthCheckResponse | |
| Watch | HealthCheckRequest | HealthCheckResponse stream |
apea/twid/v1/twid_command.proto
ChangeApeaClientIDRequest
| Field | Type | Label | Description |
|---|---|---|---|
| app_token | string | ||
| prev_apea_client_id | string | 當前的 apea_client_id | |
| next_apea_client_id | string | 新的 apea_client_id |
ChangeApeaClientIDResponse
error -> Internal | Error_TokenInvalid | Error_ClientNotFound | Error_ClientAlreadyExist
DeleteApeaClientIDRequest
| Field | Type | Label | Description |
|---|---|---|---|
| app_token | string | ||
| apea_client_id | string | 要刪除的 apea_client_id | |
| phone | string | 要刪除的 apea_client_id 所對應電話號碼 |
DeleteApeaClientIDResponse
error -> Internal | Error_TokenInvalid
DeleteAppClientIDRequest
| Field | Type | Label | Description |
|---|---|---|---|
| app_token | string | ||
| app_client_id | string | 要刪除的 app_client_id |
DeleteAppClientIDResponse
error -> Internal | Error_TokenInvalid | Error_ClientNotFound
UnlockClientRequest
| Field | Type | Label | Description |
|---|---|---|---|
| app_token | string | ||
| apea_client_id | string | 要移除失敗紀錄的 apea_client_id |
UnlockClientResponse
error -> Internal | Error_TokenInvalid | Error_ClientNotFound
ValidateRequest
| Field | Type | Label | Description |
|---|---|---|---|
| app_token | string | ||
| apea_client_id | string | 和電話號碼關聯的平台id (ex: pan 的 phone_id) | |
| app_client_id | string | 平台id下的子id(ex: pan 的 object_id)若是內部平台,不可為空 | |
| identity | string | 要驗證的身分證,如果是內部平台可為空 | |
| phone | string | 要驗證的電話號碼 | |
| ip_address | string | 發出請求的 IP,平台端需提供,如果是內部IP則不限制驗證次數 |
ValidateResponse
error -> Internal | InvalidArgument | Error_TokenInvalid | Error_IsLocked | Error_ClientHasPhoneButInputNotMatch | Error_PhoneExistButIdentityNotMatch | Error_IdentityVerifiedButNotValid | Error_PhoneDuplicated | Error_TWIDInvalid
TWIDCommand
| Method Name | Request Type | Response Type | Description |
|---|---|---|---|
| Validate | ValidateRequest | ValidateResponse | 若 24 小時內驗證 TWID 失敗達 3 次以上,則從第3次驗證時間點起算 24 小時內不可再驗證,且會紀錄永久性失敗紀錄 1 次。 若永久性失敗紀錄達 3 次以上,則該 apea_client_id 將永遠不可再驗證。 若 apea_client_id 已有驗證紀錄、但 app_client_id 尚未註冊,會直接新增關聯。(但輸入的身分證和電話號碼需與資料庫相符)。 若 apea_client_id 尚未有驗證紀錄、但指定的電話號碼已有驗證紀錄,且請求方為內部平台,則可跳過身分證驗證。 若 apea_client_id 尚未有驗證紀錄、但指定的電話號碼已有驗證紀錄且在同一個平台已有其他 apea_client_id 綁定,會報錯。 若指定的身分證已驗證、但指定的電話號碼尚未紀錄,且該身分證當前搭配的電話號碼在 2 隻以下,則會直接沿用該身分證的驗證狀態。(若指定的電話為第3隻或以上,需發實際驗證請求給 TWID)。 若有經過實際 TWID 驗證,會紀錄 twid_log(包含IP、參數和來自 TWID 的 response)。 每一筆 Validate 請求不論成功失敗,都會有 apea_log。 |
| UnlockClient | UnlockClientRequest | UnlockClientResponse | 解除指定 apea_client_id 的永久性失敗紀錄 |
| ChangeApeaClientID | ChangeApeaClientIDRequest | ChangeApeaClientIDResponse | 變更電話號碼關聯的 apea_client_id |
| DeleteApeaClientID | DeleteApeaClientIDRequest | DeleteApeaClientIDResponse | 刪除指定 apea_client_id 和電話號碼的相關紀錄 |
| DeleteAppClientID | DeleteAppClientIDRequest | DeleteAppClientIDResponse | 刪除指定 app_client_id 的相關紀錄 |
apea/twid/v1/twid_query.proto
GetVerifiedPhoneRequest
| Field | Type | Label | Description |
|---|---|---|---|
| app_token | string | ||
| apea_client_id | string | 要查詢的 apea_client_id |
GetVerifiedPhoneResponse
error -> Internal | InvalidArgument | Error_TokenInvalid | Error_ClientNotFound | Error_IdentityInvalid
| Field | Type | Label | Description |
|---|---|---|---|
| phone | string | 電話號碼 |
StatusRequest
| Field | Type | Label | Description |
|---|---|---|---|
| app_token | string | ||
| app_client_id | string | 要查詢的 app_client_id |
StatusResponse
error -> Internal | Error_TokenInvalid
| Field | Type | Label | Description |
|---|---|---|---|
| is_verified | bool | member_id 不正確、該 member 沒有查詢記錄,都會是 false |
TWIDQuery
| Method Name | Request Type | Response Type | Description |
|---|---|---|---|
| Status | StatusRequest | StatusResponse | 查詢指定 app_client_id 的 TWID 驗證狀態 |
| GetVerifiedPhone | GetVerifiedPhoneRequest | GetVerifiedPhoneResponse | 查詢指定 apea_client_id 有通過 TWID 驗證的電話號碼 |