VIP會員認證API
VIP會員認證機制
本文件描述 M+ 服務圈帳號 VIP 會員認證的設計以及運作流程。
Conventions
- API Input 及 output 參數需遵循 Json 標準
- 呼叫 API 時需以 HTTPS POST 進行。 Request 及 Response 內容須以 UTF 8 編碼.
API Details
- 要與 M+ 帳號綁定活動的服務圈+帳號廠商必須提供 1 個 HTTP API URL 讓 APP介接 , 該介接 API 須接收 3 個參數 userId, action, token, 接著呈現活動資訊提供用戶輸入相關資訊 , 處理完成後呼叫特定 URL回覆帳號綁定結果(成功/失敗), 通知訊息.
- API呼叫流程如下:
成為VIP會員流程
管理VIP會員/取消VIP會員
API Detail
(S1)廠商參加會員網址 URL (廠商API)
API description
連接到廠商活動API 帶入 3 個參數 userId, action , token , 網頁顯示活動資訊提供用戶輸入相關資訊 , 處理完成後呼叫特定 URL 回覆帳號綁定結果 (成功/失敗),通知訊息
API URL
https://hostname/example/addvipapi(廠商提供的API URL)
Input Parameter
Name | Type | Max Length | Mandatory | Description |
---|---|---|---|---|
action | String | 10 | Yes | bind: 帳號綁定 unbind: 取消帳號綁定 info: 活動資訊頁 |
userld | String | 30 | Yes | 經過AES加密的用戶userid |
token | String | 80 | Yes | 隨機產生的臨時英數混合 |
secCode | String | 80 | No | Security code 驗證碼 判斷正確的話才視為合法的呼叫 |
secCode 驗證碼產生規則為 userId+token 經 AES 編碼
secCode 驗證碼驗證失敗顯示無效的請求網頁
Example
Input | String: queryString http://hostname/example/someapi? action=bind&userId=Ldo+lDA68DNTERghBzBHOw== &token=4T1VTTaEAL07YKgZ71H74V |
---|---|
Output |
處理結果回覆訊息API (M+API)
API description
廠商會員頁面流程完成後呼叫此 API 記錄處理結果並回傳結果通知用戶
API URL
Production:https://club.mplusapp.com/MplusCelebrityManager/sendResultMessage
Input Parameter
Name | Type | Max Length | Mandatory | Description |
---|---|---|---|---|
action | String | 10 | Yes | bind: 帳號綁定 unbind: 取消帳號綁定 |
result | String | 2 | Yes | 0: success 1: fail |
userId | String | 30 | Yes | 經過AES 加密的 userid |
token | String | 80 | Yes | 需帶入活動連結的token |
msg | String | 256 | Yes | 訊息內容文字 |
secCode | String | 80 | Yes | Security code 驗證碼判斷正確的話才視為合法的呼叫 |
Output Parameter
Name | Type | Max Length | Mandatory | Description |
---|---|---|---|---|
result | String | 2 | Yes | 00:success 10:invalid token (無此token 或已失效) 11:invalid code(驗證失敗無效的呼叫) 20:參數錯誤 90:系統錯誤 |
Example
Input | String: queryString http://hostname/PresenceServer/sendMessage? result=0&action=bind&userId=Ldo+lDA68DNTERghBzBHOw==&token= 4T1VTTaEAL07YKgZ71H74V & 參加活動完成 |
---|---|
Output | String:jsonString [成功] { "result":"00" } |
secCode 驗證碼產生規則為 userId+token 經 AES 編碼
(M2)取消VIP會員API (M+API)
API description
廠商端因為用戶客訴或其他因素要取消某用戶會員資格時呼叫此API通知M+解除帳號綁定並通知用戶
API URL
Production:https://club.mplusapp.comMplusCelebrityManager/cancelMember
Input Parameter
Name | Type | Max Length | Mandatory | Description |
---|---|---|---|---|
action | String | 10 | Yes | bind: 帳號綁定 unbind: 取消帳號綁定 |
userId | String | 30 | Yes | 經過AES 加密的 userid |
msg | String | 256 | Yes | 訊息內容文字 |
spld | String | 80 | Yes | 廠商呼叫API 帳號 |
spPwd | String | 80 | Yes | 廠商呼叫API 密碼 |
Output Parameter
Name | Type | Max Length | Mandatory | Description |
---|---|---|---|---|
result | String | 2 | Yes | 00:success 11:invalid id or password(驗證失敗無效的呼叫) 20:參數錯誤 90:系統錯誤 |
Example
Input | String: queryString http://hostname/PresenceServer/cancelMember? action=bind&userId=Ldo+lDA68DNTERghBzBHOw==&spId=99999997&spPwd= 3983abc0 & 取消會員資格 |
---|---|
Output | String:jsonString [成功] { "result":"00" } |
(M3)發送M+訊息API (M+API)
API description
廠商端發送文字訊息給特定VIP 會員用戶
API URL
Production:https://club.mplusapp.com/MplusCelebrityManager/sendChatMessage
Input Parameter
Name | Type | Max Length | Mandatory | Description |
---|---|---|---|---|
userId | String | 30 | Yes | 經過AES 加密的 userid |
msg | String | 256 | Yes | 訊息內容文字 |
spld | String | 80 | Yes | 廠商呼叫API 帳號 |
spPwd | String | 80 | Yes | 廠商呼叫API 密碼 |
Output Parameter
Name | Type | Max Length | Mandatory | Description |
---|---|---|---|---|
result | String | 2 | Yes | 00:success 11:invalid id or password(驗證失敗無效的呼叫) 20:參數錯誤 90:系統錯誤 |
Example
Input | String: queryString http://hostname/MplusCelebrityManager/sendChatMessage? action=bind&userId=Ldo+lDA68DNTERghBzBHOw==&spId=99999997&spPwd= 3983abc0 & 好康訊息通知 |
---|---|
Output | String:jsonString [成功] { "result":"00" } |