Terra

Integration

API
Unified API
SDK
SDK
Authentication
Authentication
Streaming
Streaming
Blood
Blood Report API
Planned Workout
Planned Workout
AI Interface
AI Interface

User engagement

Graph API
Graph API
Scores
Health Scores
Rewards
Health Rewards

Use cases

Enterprise
Enterprise
Insurance
Insurance

Developers

Wearable Data
Wearable Data
Community
Community
Documentation
Documentation

Learn

Blog
Blog
Podcast
Podcast
Events
Events
Reports
Reports

Company

Customers
Customers
Careers
Careers
Partners
Partners
Support
Support
Become an integration
Become an integration


Cookie Preferences

Essential CookiesAlways On
Advertisement Cookies
Analytics Cookies

Crunch Time: Embrace the Cookie Monster Within!

We use cookies to enhance your browsing experience and analyse our traffic. By clicking “Accept All”, you consent to our use of cookies according to our Cookie Policy. You can change your mind any time by visiting out cookie policy.

zap

Latest

zap

Popular

API

Unified API

SDK

Phone SDK

Authentication

Widget

Streaming

Streaming

Graph API

Graph API

Authenticating my wearable succeeds, but takes a really long time

All

GoodReptile26 months ago

Hey there, we are using the Terra widget for our webapp and began connecting a fitbit device; generating the widget url and submitting all the details succeeded very quickly, however after allowing Terra to connect to the Fitbit account, there was a massive delay before redirecting back to our website. A few times the widget returned a 504 Gateway timeout error.

We tested different auth_success_redirect_url values and even removed the redirect entirely, but the long delays still persisted. How would we diagnose this issue?

terra

Alexadmin26 months ago

Hey there. This sounds like your configured webhook is taking too long to respond and Terra sends an auth_success payload synchonously when connecting devices.

To be certain that this is the cause, you can try deactivating your webhook by going on Dashboard > Connections and pressing the toggle next to Webhook.

Also, you can check the Response Times recorded from your webhook by navigating to Dashboard > Tools > Debug > Event Log and identifying an event with the Data Type set to auth_success and pressing the arrow on the right; if the response time exceeds 2000ms, you should investigate sources of delay in your webhook implementation.


GoodReptile26 months ago

I tried again with the webhook removed and the delay was gone. I believe the issue was caused by a long-running database query, we have made this async and it resolved everything. Thank you for the support.