Getting started.
From an empty account to an app a practice can connect, in six steps.
-
Create an app
Sign in with your email: each sign-in sends a link, there is no password, and you don't need a Smileline practice. Name the app. Its client id (
Sign inapp_…) is public; the client secret (sl_cs_…) is shown once, so store it before you close the dialog. Regenerating it replaces it at once in every region. -
Set redirect URIs and scopes
Redirect URIs must match exactly and use HTTPS; plain HTTP works on
localhostonly. Ask for areas of practice data as.reador.write(write includes read), plusoffline_accessfor a refresh token. Practices see exactly that list.
Scopespatients.read appointments.write offline_access -
Send a practice to authorise
Send an owner or manager to the authorise URL with your client id, redirect URI, scopes, a
stateand a PKCE challenge (S256is mandatory).https://developer.smileline.io/oauth/authorize ?response_type=code &client_id=app_c1i2e3n4t5 &redirect_uri=https%3A%2F%2Fapp.example.com%2Foauth%2Fcallback &scope=patients.read%20appointments.write%20offline_access &state=8f3a… &code_challenge=E9Melhoa… &code_challenge_method=S256They choose UK & Europe or United States, sign in, pick the practice and review the scopes. Add
OAuth 2.0region=euorregion=usto skip the question. -
Exchange the code, then call the API
Exchange the code at the token URL; the region is resolved from the code.
curl -X POST https://developer.smileline.io/oauth/token \ -d grant_type=authorization_code \ -d client_id=app_c1i2e3n4t5 \ -d client_secret=$CLIENT_SECRET \ -d code=$CODE \ -d code_verifier=$PKCE_VERIFIER \ -d redirect_uri=https://app.example.com/oauth/callbackKeep
api_base_urlandorganization_idfrom the response: every request for this practice goes to that base URL.curl "$API_BASE_URL/patients?limit=10" \ -H "Authorization: Bearer sl_oat_…"Access tokens last an hour; refresh tokens last 30 days and rotate on every use.
API reference -
Receive webhooks
Give the app one HTTPS delivery URL and choose its events. Within about five minutes of a practice connecting, Smileline sends a challenge with an
X-Hook-Secretheader; reply2xxwith the same header and value. Delivery starts after that echo, so backfill anything earlier from the list endpoints.
App webhooksX-SmileLine-Timestamp: 1760870400 X-SmileLine-Delivery-Id: 7c0f… X-SmileLine-Signature: v1=<hex> v1 = hex(HMAC-SHA256(signing_secret, timestamp + '.' + deliveryId + '.' + rawBody)) -
Submit for approval
Until then the app is live in both regions, capped at 25 connected practices per region and marked unreviewed on the consent screen. Submitting needs a redirect URI, a permission area, a privacy policy URL and a support email; approval lifts the cap and the notice.
Approval