Skip to content
userinfo

web 呼叫範例 ​

json
{
  "name": "userinfo",
  "data": null
}

app 回傳 ​

Account
  • id: 使用者唯一序號
    string

  • account: 使用者帳號
    string

  • username: 使用者名稱
    string

  • realName: 真實姓名
    string

  • idNo: 身分證字號
    string

  • email: 電子郵件
    string

  • phoneNo: 手機號碼
    string

  • birthday: 生日
    string

  • memberType: 會員類別
    string

    "personal": 一般會員

    "organization": 組織會員
    "foreigner": 外籍人士
    "employee": 北市府機關員工
    
  • verifyLevel: 會員驗證等級
    string

    0: 未驗證
    > 大於 0: 已實名

  • addresses: 通訊地址
    array[Address]

    Address:
    • zip3: 郵遞區號
      int

    • city: 鄉鎮市
      string

    • town: 市區
      string

    • village: 鄰里
      string

    • street: 街道
      string

    • usageType: 標記型態
      string

      0: 其他
      > 1: 住家
      > 2: 公司

    • seq: 序號
      int

    • priority: 是否為預設地址
      bool

  • residentAddress: 戶籍地址
    string

  • citizen: 是否為台北市民
    bool

  • nativePeople: 是否為原住民
    bool

  • cityInternetUid: 舊網路市民 ID
    string

app 回傳範例 ​

json
{
  "name": "userinfo",
  "data": {
    "id": "7f3562f4-bb3f-4ec7-89b9-da3b4b5ff250",
    "account": "wz7786",
    "username": "Wesley",
    "realName": "金大森",
    "idNo": "A123456789",
    "email": "ist83903@bcaoo.com",
    "phoneNo": "0932166777",
    "birthday": "1988/12/12",
    "memberType": "personal",
    "verifyLevel": "3",
    "addresses": [
      {
        "zip3": 104,
        "city": "臺北市",
        "town": "中山區",
        "village": "正得里",
        "street": "吉林路",
        "usageType": "0",
        "seq": 1,
        "priority": true
      }
    ],
    "residentAddress": "臺北市中山區吉林路 69 號 4 樓",
    "citizen": true,
    "nativePeople": false,
    "cityInternetUid": ""
  }
}
launch_map

web 呼叫範例 ​

json
{
  "name": "launch_map",
  "data": "https://maps.app.goo.gl/sQKx4n3WctXuS5Bw8"
}

app 回傳 ​

  • bool: 可否開啟地圖功能

app 回傳範例 ​

json
{
  "name": "launch_map",
  "data": true
}
phone_call

web 呼叫範例 ​

json
{
  "name": "phone_call",
  "data": "02-1234-5678"
}

app 回傳 ​

  • bool: 可否開啟電話功能

app 回傳範例 ​

json
{
  "name": "phone_call",
  "data": bool
}
1999agree

web 呼叫範例 ​

json
{
  "name": "1999agree",
  "data": true
}

data 不可為 null,內容不影響行為。app 固定撥打 1999。

app 行為 ​

  1. 使用者尚未同意電話撥打條款時,app 先開啟條款頁。
  2. 使用者同意後,app 顯示「語音通報」對話框,使用者按「立即撥號」才會撥出。

app 回傳 ​

  • 成功顯示對話框時,app 不回覆。
  • 裝置無法撥打電話,或使用者未同意條款時,app 回覆 false。

app 回傳範例 ​

json
{
  "name": "1999agree",
  "data": false
}
location

web 呼叫範例 ​

json
{
  "name": "location",
  "data": null
}

app 回傳 ​

Position 詳見 GeoLocator - Position
  • accuracy: 水平精準度(公尺)
    double

  • altitude: 高度(公尺)
    double

  • altitude_accuracy: 高度精準度(公尺)
    double

  • floor: 樓層
    int, nullable

  • heading: 移動中的朝向方向
    double

  • heading_accuracy: 移動中的朝向方向精準度(度)
    double

  • is_mocked: 是否為模擬定位數據(Android API lvl 18 後版本)
    bool

  • latitude: 緯度(-90.0(含) ~ +90.0(含))
    double

  • longitude: 經度(-180.0(不含) ~ +180.0(含))
    double

  • speed: 移動速度(公尺/秒)
    double

  • speed_accuracy: 移動速度精準度(公尺/秒)
    double

  • timestamp: 當前數據取得時間(ms)
    int

  • vertical_speed: 垂直速度(公尺/秒),正值為上升、負值為下降。裝置不支援時為 0.0
    double

  • vertical_speed_accuracy: 垂直速度精準度(公尺/秒)。裝置不支援時為 0.0
    double

  • has_accuracy、has_altitude、has_altitude_accuracy、has_heading、has_heading_accuracy、has_speed、has_speed_accuracy、has_vertical_speed、has_vertical_speed_accuracy: 平台是否實際回報對應欄位。為 false 時,對應欄位的 0.0 只是預設值,不是量測結果
    bool

app 回傳範例 ​

json
{
  "name": "location",
  "data": {
    "longitude": -121.406417,
    "latitude": 38.785834,
    "timestamp": 1724466344054,
    "accuracy": 5.0,
    "altitude": 0.0,
    "altitude_accuracy": 0.0,
    "floor": null,
    "heading": -1.0,
    "heading_accuracy": -1.0,
    "speed": 0.0,
    "speed_accuracy": 0.0,
    "is_mocked": true,
    "vertical_speed": 0.0,
    "vertical_speed_accuracy": 0.0,
    "has_accuracy": true,
    "has_altitude": true,
    "has_altitude_accuracy": true,
    "has_heading": false,
    "has_heading_accuracy": false,
    "has_speed": true,
    "has_speed_accuracy": true,
    "has_vertical_speed": false,
    "has_vertical_speed_accuracy": false
  }
}
deviceinfo

web 呼叫範例 ​

json
{
  "name": "deviceinfo",
  "data": null
}

app 回傳範例 ​

ios

可參考: UIDevice, utsname

json
{
  "systemName": "iOS",
  "isPhysicalDevice": false,
  "utsname": {
    "release": "23.6.0",
    "sysname": "Darwin",
    "nodename": "xxx-MBP",
    "machine": "iPhone16,1",
    "version": "Darwin Kernel Version xxx: ..."
  },
  "model": "iPhone",
  "localizedModel": "iPhone",
  "systemVersion": "17.x",
  "name": "iPhone xxx",
  "identifierForVendor": "xxx-xxx-xxxx-...",
  "modelName": "iPhone 15 Pro",
  "isiOSAppOnMac": false,
  "isiOSAppOnVision": false,
  "physicalRamSize": 8192,
  "availableRamSize": 2048,
  "freeDiskSize": 8593948672,
  "totalDiskSize": 10411143168
}
android

可參考:android.os.Build

json
{
  "product": "sdk_gphone64_arm64",
  "supportedAbis": [
    "arm64-v8a"
  ],
  "supported32BitAbis": [],
  "display": "AP31.xxxx.xxx",
  "type": "user",
  "isPhysicalDevice": false,
  "version": {
    "baseOS": "",
    "securityPatch": "2024-xx-xx",
    "sdkInt": 34,
    "release": "14",
    "codename": "VanillaIceCream",
    "previewSdkInt": 1,
    "incremental": "11566045"
  },
  "systemFeatures": [
    "android.hardware.sensor.proximity",
    "android.software.adoptable_storage",
    ...
  ],
  "manufacturer": "Google",
  "tags": "release-keys",
  "supported64BitAbis": [
    "arm64-v8a"
  ],
  "bootloader": "unknown",
  "fingerprint": "google/sdk_gphone64_arm64/...",
  "host": "x-xxx-...",
  "isLowRamDevice": false,
  "model": "sdk_gphone64_arm64",
  "id": "AP31.xxxx.xxx",
  "brand": "google",
  "device": "emu64a",
  "board": "goldfish_arm64",
  "hardware": "xxxxxx",
  "name": "xxx",
  "time": 1724466344000,
  "physicalRamSize": 3967,
  "availableRamSize": 1536,
  "freeDiskSize": 8593948672,
  "totalDiskSize": 10411143168
}
open_link

web 呼叫範例 ​

json
{
  "name": "open_link",
  "data": "https://www.gov.taipei/"
}

app 行為 ​

data 為網址字串時,app 以內建 WebView 開啟該網址。

app 回傳 ​

  • 成功開啟時,app 不回覆。
  • data 為 null 時,app 回覆 false。

app 回傳範例 ​

json
{
  "name": "open_link",
  "data": false
}
notify

web 呼叫範例 ​

json
{
  "name": "notify",
  "data": {
    "title": "訂閱通知",
    "content": "已取消訂閱xxx"
  }
}

app 行為 ​

  • app 以 title、content 發送一則手機通知。
  • content 符合 已訂閱xxx 時,app 會把 xxx 加入訂閱清單。
  • content 符合 已取消訂閱xxx 時,app 會把 xxx 移出訂閱清單。

app 回傳 ​

  • 成功發送通知時,app 不回覆。
  • data 不是物件時,app 回覆 false。

app 回傳範例 ​

json
{
  "name": "notify",
  "data": false
}
qr_code_scan

web 呼叫範例 ​

json
{
  "name": "qr_code_scan",
  "data": null
}

app 行為 ​

app 開啟 QR Code 掃描頁。掃描到內容或使用者返回後,app 關閉掃描頁並回覆結果。

app 回傳 ​

  • string: 掃描到的內容
  • null: 使用者未掃描即返回

app 回傳範例 ​

json
{
  "name": "qr_code_scan",
  "data": "https://www.gov.taipei/"
}