Terra SDKs

Some data providers require on-device authentication and do not support an API to authenticate users with the Terra ecosystem. This means that users cannot agree to share through the widget. Instead, the user has to agree to share data for e.g. Apple Health or Samsung Health on their device directly. This requires your product to call the corresponding on-device SDK for the data provider (e.g. calling Apple Health and ask for data sharing).

We provide support for such on-device authentications with the Terra ecosystem.

Upon the completion of a widget session, for a successful session, you will receive the Terra userID and the provider both to your webhook and in the redirect URL. In the case of on-device authentication, you will only receive the provider (and a NULL userID), and will have to trigger the corresponding SDK for the provider on the user device to complete the authentication.

For example, with Apple Health:

  • My application opens a widget session for the user
  • The user selects Apple as a provider
  • Upon completion, I will receive provider=APPLE from Terra
  • I then make my application call the Terra Apple SDK
  • The user gets asked by Apple Health to allow data sharing with Terra

Each SDK provides native support as well as framework support (e.g. React Native) where possible