Handling authentication events
Last updated
Was this helpful?
Last updated
Was this helpful?
Terra pushes a to your data destination (e.g. Webhook) any time a user has connected, disconnected, failed to connect, reconnected, or their access was revoked.
These event payloads contain important details such as: user_id
, auth status
, and message
.
Here is an example of a successful auth
event:
You can find all your received events (payloads) in:
Without this step, you won't be able to associate data events (like activity or sleep) with the right user.
To correctly parse the payloads, review the full list of event formats under .
Your .
Once your end-user has authenticated their data source, you will receive an .
Your goal is to obtain a user_id
from the in order to map incoming health data to the correct user in your system. You should save this retrieved user_id
in your Database.
Yes. Connecting an account (i.e. ) a second time on the same dev_id
will delete the previous user
record for that account, and yield a new user_id