Event Types
Summary
Terra automatically sends data modeled as Events to your webhook. Each Event should arrive in JSON format.
Each event contains a type
field that specifies its type, and a user
field that specifies which TerraUser
the event relates to.
{
"type": String,
"user": TerraUser,
...
}
View all event types that you may receive from your webhook. The complete documentation of the data included in each event type can be found in Event Types reference.
Type | Explanation |
---|---|
auth | Occurs when a user attempts to authenticate |
deauth | Occurs when a user deauthenticates through the Terra |
user_reauth | Occurs when a user successfully authenticates for a second time, with the same account. You will receive a successful auth and a user_reauth payload |
access_revoked | Occurs when a user revokes Terra's access from the provider's end |
connection_error | Occurs when a request to a provider returns an HTTP response of 401, 403 or 412 |
google_no_datasource | Occurs when a Google Fit user doesn't have a data source linked to their account. All data requests for the user will be empty unless they link a data source |
processing | Occurs when data is being fetched asynchronously from the provider. The data will be sent through automatically via webhook, and you can also safely request for it after the time in the retry_after_seconds field. |
large_request_sending | Occurs when more than one month of data has been requested and all data has been successfully submitted |
large_request_processing | Occurs when more a request for over one month of data has been submitted to Terra. Data will be sent in chunks with the same reference field after this request. Each chunk will be at most 10 objects in the data field or 10 MB in size, whichever limit gets hit first |
activity, athlete, body, daily, menstruation, nutrition, sleep | Occurs throughout the day as users use their wearables. activity updates when new activity is complete |
Updated about 1 year ago