Q: Can I use Terra API endpoints without webhooks?

HighCondor2 months ago

I do not wish to create a Webhook and wait for user data. I want 2 weeks of user data the moment they connect.

terra

Alexadmin2 months ago

Yes, you can set 'to_webhook' to false and directly get data via request return, which is useful for development and testing, but can also be used in production. For example, the following request will get you 2 weeks of activity data:

curl --location 'https://api.tryterra.co/v2/activity?user_id=[USER-ID]&start_date=2024-03-01&to_webhook=false&with_samples=true' \ --header 'dev-id: [YOUR-DEV-ID]' \ --header 'x-api-key: [YOUR-API-KEY]'

However, if you wish to query more than one month of data in a single request - you will need to have a webhook or alternate destination setup as we will send the data in batches. Or you can break up the quest into several requests with smaller time ranges.


ManagerialWalrus1 month ago

Wath the purpose of Terr