Create a link to the hosted connection page
Returns a link to a page served by Open Health Sync where the user picks a provider and goes
through its consent, so your app needs no connection UI of its own. The token in the link is
the page's only credential: send the link to this user only. It serves several providers
until expires_at. After each consent the user lands on
redirect_uri?status=connected|error&provider=<slug>, or, without redirect_uri, on the
built-in result page, which links back to the connection page. See docs/connect-page.md.
tenantKeyAuthorizationBearer <token>Tenant API key, ohs_sk_ + 43 base62 characters.
id*stringuuidapplication/json- body
redirect_uri?stringWhere the user lands after each consent. Absolute https URL (http only for localhost).
urilength <= 2048providers?array<string>Provider slugs the page offers, in this order. Each must be an OAuth provider enabled on this instance. Default, every one.
items <= 64app_name?stringShown as the page title.
length <= 80logo_url?stringAn https image shown above the title.
urilength <= 2048ttl_seconds?integer60 <= value <= 36001800The page link.
application/json- response
url*string<OHS_PUBLIC_URL>/connect?session=<token>
uriexpires_at*stringdate-timecurl -X POST 'http://localhost:8080/v1/users/497f6eca-6276-4993-bfeb-53cbbbba6f08/connect-sessions' \ -H 'Authorization: Bearer ohs_sk_...' \ -H 'Content-Type: application/json' \ -d '{}'{ "url": "http://example.com", "expires_at": "2019-08-24T14:15:22Z"}