For the complete documentation index, see llms.txt. This page is also available as Markdown.

Authentication redirect pages

Set where Terra sends the end user after they connect a provider, and read the parameters added to that URL.

After the end user completes the authentication flow, they are redirected to a default final URL: a success or failure screen, before they go back to your app. You can replace these URLs when you call one of the /auth endpoints.

Default redirect pages

When the user authenticates a health account (e.g. Oura), before they go back to your app, they see a final URL (screen) of the authentication flow, which is either a success or failure screen.

Default Success Redirect URL
Default Failure Redirect URL

The final url will append the following parameters:

  • user_id (not Null)

  • resource (not Null)

  • reference_id (can be Null if you did not pass it in the auth endpoint).

Set your redirect URLs

Terra provides these urls by default, and they can also be customized in the /auth endpoints. They can be specified in the body of the authentication request as:

  • auth_success_redirect_url

  • auth_failure_redirect_url

Redirect targets

You can redirect to a:

  • Web page: A specific page on your web application, including any useful query parameters.

    • Example: https://somereallycoolcompany.com?terra_auth_success=true

  • Deep link: A deep link into your mobile application.

    • Example: reallycoolapp://success

Mobile-only sources

Next steps

  • Event delivery: how Terra sends events to your destinations, and what their statuses mean.

  • Health data events: process the data Terra sends for connected users.

  • Mobile SDKs: connect Apple Health, Samsung Health and Health Connect from your app.

Last updated

Was this helpful?