> 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/help-center/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.

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 sets how far back history goes for each Garmin app, and only for users who enabled Garmin's historical data permission. Coros allows up to 3 months back from now or 24 hours before the user authenticated (whichever is hit first). Polar workouts go back up to 30 days but not before the user granted permission, while Polar sleep and daily data go back about a year.
