API ReferenceapiclinicalPOST /v1/wearables/link/token

POST /v1/wearables/link/token

Service: clinical · operationId: (none)

Mint a Junction Link session token for the current patient

Required scopes

(no scope declared — review service config)

Request body

{
  "type": "object",
  "properties": {
    "provider": {
      "type": "string",
      "enum": [
        "apple_health_kit",
        "google_fit",
        "oura",
        "whoop",
        "eight_sleep",
        "dexcom",
        "freestyle_libre",
        "garmin"
      ]
    },
    "redirect_url": {
      "type": "string",
      "format": "uri"
    }
  }
}

Responses

{
  "type": "object",
  "properties": {
    "link_token": {
      "type": "string"
    },
    "link_web_url": {
      "type": [
        "string",
        "null"
      ]
    },
    "expires_at": {
      "type": [
        "string",
        "null"
      ]
    }
  },
  "required": [
    "link_token",
    "link_web_url",
    "expires_at"
  ]
}

400 Validation error

{
  "type": "object",
  "properties": {
    "error": {
      "type": "string"
    },
    "message": {
      "type": "string"
    }
  },
  "required": [
    "error",
    "message"
  ]
}

502 Junction upstream error

{
  "type": "object",
  "properties": {
    "error": {
      "type": "string"
    },
    "message": {
      "type": "string"
    }
  },
  "required": [
    "error",
    "message"
  ]
}

Example

curl -X POST https://clinical.platform.loop.health/v1/wearables/link/token \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ ... }'