> For the complete documentation index, see [llms.txt](https://docs.tryterra.co/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tryterra.co/faq/help-topics/data-api-sdk/api-endpoints-errors-and-migrations/sdk-vs-web-providers.md).

# Why does authenticateUser fail for some provider names?

**Providers marked `setup: 'SDK'` in `/v2/integrations/detailed` (Apple Health, Google Fit / Health Connect) cannot be used with `/v2/auth/authenticateUser`, which is web-only.** That's the source of the validation error.

* **For SDK providers**, integrate the Terra mobile SDK and call `initConnection` with a token from `/v2/auth/generateAuthToken`.
* **Web providers** (Fitbit, Garmin, Oura, Withings, Polar, Suunto) work with `authenticateUser` directly.

There's **no automatic migration** from an API-based connection to an SDK-based connection. When a previously API-connected user logs in, call `initConnection` (ideally behind a modal explaining the new permissions). Each user must re-grant permissions through the SDK flow.

See [mobile-only sources](https://docs.tryterra.co/health-and-fitness-api/mobile-only-sources) for SDK integration.
