> 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/connecting/connection-errors-and-api-responses/webhook-30s-timeout-and-historical-data.md).

# Why does the OAuth redirect hang or return missing\_scopes?

Two separate things are happening here.

**The redirect hang:** Terra sends the [authentication webhook](https://docs.tryterra.co/health-and-fitness-api/user-authentication/handling-authentication-events) to your server synchronously. If your server takes longer than 30 seconds to respond, the client-side redirect hangs or errors even though the connection succeeded, so **make your webhook endpoint respond quickly**.

**The missing history:** webhooks only deliver data generated *after* the user connects. For earlier data, call the [historical endpoints](https://docs.tryterra.co/health-and-fitness-api/managing-user-health-data/requesting-historical-data) (e.g. `/v2/activity`, `/v2/daily`) with a `start_date` range and `to_webhook=true`.

Most providers allow full history. Some impose limits: Garmin allows up to 5 years back (subject to Garmin's backfill limits), Coros allows up to 3 months back from now or 24 hours before the user authenticated (whichever is hit first), and Polar allows up to 30 days back but not before the user granted permission.
