Can't create user with Samsung Health.
AllGiantHeron8 months ago
When i choose Samsung on the widget, it shows the success message - "Your device is connected successfully to samsung.", But the user doesn't get created on the terra dashboard?
Vanessaadmin8 months ago
Hi there!
When using Mobile SDK-based integrations like Apple Health, Samsung Health, or Health Connect, the widget will redirect users to your auth_success_redirect_url with a null user_id by default. This is expected behavior for Samsung Health: a Terra user isn’t created immediately in the dashboard since the connection must be completed via the Terra Mobile SDK!
Here's how to handle Samsung Health properly:
Set up deep links Redirect your users back into your app (e.g., yourapp://on_auth_success) after the widget flow. The widget will pass user_id, reference_id, and resource as query params.
Install & initialize the SDK
- Android (Kotlin setup): https://docs.tryterra.co/health-and-fitness-api/mobile-only-sources/android-kotlin
- General setup for mobile only sources: https://docs.tryterra.co/health-and-fitness-api/mobile-only-sources
Complete the connection
- After redirect, call initConnection() with Connection.samsung to finalise Samsung Health linking.
Generate an auth token
- Use the Generate Auth Token endpoint from your backend before calling initConnection().
Vanessaadmin8 months ago
Important notes
Terra API provides you with direct Samsung Health SDK access through a privileged partnership! Meaning if you apply for Samsung Health, please submit a ticket via the Terra Dashboard on Support. This makes sure we know that you've submitted the application and we can ensure that you get accepted. Once approved, you’ll receive the dedicated setup.
Hope this helps :)
SillyPigeon7 months ago
Tanmay Dhar is boy