Skip to content

Instantly share code, notes, and snippets.

@Zenexer
Last active March 24, 2024 10:44
Show Gist options
  • Star 40 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save Zenexer/e1c03b87fee6236c71e4fefcb1ff73a9 to your computer and use it in GitHub Desktop.
Save Zenexer/e1c03b87fee6236c71e4fefcb1ff73a9 to your computer and use it in GitHub Desktop.
API for Google Wifi and OnHub; mostly untested

Endpoints

Arbitrary error response

  • Content-Type: application/json
  • Body:
    • error: string
    • code: int32

Endpoint details

get-attestation-information

Request

  • GET
    • (none)

Response

  • GET; in testing:
    • Content-Type: text/plain
    • Status: 403
    • Body: Device is registered

get-endorsement-information

Request

  • GET
    • (none)

Response

  • GET; in testing:
    • Content-Type: text/plain
    • Status: 403
    • Body: Device is registered

prepare-for-setup

Request

  • POST
    • Content-Type: application/json
    • Body: empty JSON object ({})

Response

  • POST
    • ?

wan-configuration

Request

  • GET
    • (empty)
  • POST
    • Content-Type: application/json
    • Body:
      • type: string; one of:
        • pppoe
        • static
        • dhcp
      • (see below for others)

Set PPPoE

  • type: string; "pppoe"
  • username: string
  • password: string

Set static IP address

  • type: string; "static"
  • ipAddress: string
  • netmask: string
  • gateway: string

Set DHCP

  • type: string; "dhcp"

Response

  • GET
    • Content-Type: application/json
    • Returns the type property of the current configuration; all other properties are omitted
    • Body:
      • type: string
  • POST
    • ?

diagnostic-report

Request

  • GET
    • ?

Response

  • GET
    • ?

submit-feedback

Request

  • POST
    • Content-Type: application/json
    • Body: ?

Response

  • POST
    • ?

join-group

Request

  • POST
    • Content-Type: application/json
    • Body:
      • groupConfiguration: string
      • kek: string
      • mac: string

Response

  • POST
    • ?

prove-identity

Request

  • POST
    • Content-Type: application/x-protobuf
    • Body: ?

Response

  • POST
    • ?

register-device

Request

  • POST
    • Content-Type: application/json
    • Body:
      • ticketId: string
      • displayName: string

Response

status

Request

  • GET
    • Querystring parameters:
      • type: string; optional; one of:
        • wan
        • system
        • software
        • "" (empty string): triggers a connection check

Response

Note: If type was specified as a querystring parameter, the resulting JSON object will be filtered to only include the corresponding key/value. For example, if requested with ?type=software, the response will resemble {"software":{...}}.

  • software
    • softwareVersion: string
    • updateChannel: string; e.g. "stable-channel"
    • updateNewVersion: string; if no update, "0.0.0.0"
    • updateProgress: double; if no update in progress, 0.0
    • updateRequired: boolean
    • updateStatus: string; one of:
      • checking
      • downloading
      • idle
      • unknown
      • updated
      • updating
      • waiting
  • system
    • countryCode: string; e.g. "us"
    • groupRole: string; e.g. "root"
    • hardwareId: string
    • lan0Link: boolean
    • modelId: string
    • uptime: int
  • vorlonInfo
    • migrationMode: string; e.g. "vorlon_all"
  • wan
    • captivePortal: boolean
    • ethernetLink: boolean
    • gatewayIPAddress: boolean; WAN default gateway
    • invalidCredentials: boolean
    • ipAddress: boolean
    • ipMethod: string; probably one of:
      • dhcp
      • static
      • pppoe
    • ipPrefixLength: int; e.g. 24
    • leaseDurationSeconds: int; e.g. 86400
    • localIpAddress: string; WAN IP address of Google Wifi
    • nameservers: string[]; WAN nameservers advertised by DHCP
    • online: boolean
    • pppoeDetected: boolean

connected-devices

  • URL: http://onhub.here/api/v1/connected-devices
  • Methods: GET
  • Purpose: Probably used to discover home automation devices like Philips Hue bridges
  • Note: I couldn't actually find this in the APK, but it definitely exists.

Request

  • GET
    • ?

Response

  • GET
    • Content-Type: application/json
    • Body:
      • _hueBridges: array
        • ?

get-shmac

Request

  • GET
    • Content-Type: application/json (ignored)
    • Body: (none)
    • Querystring parameters:
      • ip: string; station's IP address

Response

  • GET
    • Content-Type: application/json
    • Body:
      • id: string; 64-digit hex identifier for station

vorlon-registration-complete

Request

  • POST
    • Content-Type: application/json
    • Body: (empty JSON object?)

Response

  • POST
    • ?

vorlon-registration-info

Request

  • GET
    • empty

Response

  • GET
    • Content-Type: text/plain
    • Body:
      • Only known possible value:
        • Device is already setup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment