APIs & services / Bridge session API (ctld)

Register the phone with Bridge and get its device id before login.

Endpointtoday's app
Call
PUT /ctld/api/device/deviceid/v1
Service
Bridge session API (ctld)
Features
Login
When
Immediately before every login and silent re-login
Auth
None (no session yet)
In the App Service

Use case

Verified live on 2026-10-22 against the dev server (debug build, emulator, ap.gov test user). LoginHelper.getLoginHeaders calls this right before each session request. It sends the phone's DeviceInfo and receives a device id, which is then sent as X-DEVICEID on the login call. If the status is not 200 the login is aborted with 'Device registration failed'. {base} is bridge_base_url (dev: https://dev.platformcommons.org) or, for user@@ap.gov when federation is on, federation_url (https://ryss.ap.gov.in), followed by the techl prefix /ctld (BaseURLUtil.getBaseURLWithTechl). The same device id is returned every time for the same phone.

Headers

HeaderValueNotes
Content-Typeapplication/jsonBody is the Gson-serialised DeviceInfo.

Request

Example request body (synthetic data)
{
  "id": 0,
  "deviceId": "<previous id or null>",
  "uniqueId": "<android id>",
  "deviceMake": "Google",
  "deviceModel": "Pixel 6a",
  "macAddress": "<placeholder>",
  "os": null,
  "osVersion": "14",
  "formFactor": null
}
FieldTypeRequiredNotes
idintegerNo0 on the wire for a new registration (observed).
deviceIdstringNoPreviously issued device id, if any.
uniqueIdstringYesAndroid unique id from DeviceInfoManager.
deviceMakestringNoBuild.MANUFACTURER.
deviceModelstringNoBuild.MODEL.
macAddressstringNoPlaceholder on modern Android.
osstringNoAndroid. Sent as null by Urvi (observed).
osVersionstringNoBuild.VERSION.RELEASE.
formFactorstringNoPHONE or TABLET. Sent as null by Urvi (observed).

Response

Example response body (synthetic data)
a1b2c3d4e5f60718
FieldTypeRequiredNotes
(body)stringDevice id: 16 hex characters as plain text (observed). Sent as X-DEVICEID on POST /ctld/api/session/v1.

Errors

StatusWhenWhat the app does
any non-200Device registration rejected or server unreachableWrongLoginInfoException 'Device registration failed'; the login screen shows an error and no account is created.

Source

  • account-lib/library/src/main/java/com/mindtree/bridge/accountlib/helper/LoginHelper.java
  • account-lib/library/src/main/java/com/mindtree/bridge/accountlib/config/DeviceInfo.java
  • account-lib/library/src/main/java/com/mindtree/bridge/accountlib/manager/DeviceInfoManager.java