Hello! this is my first time using the scripting block and first time trying to use an API with code (I’ve used lots of no-code tools in the past; Zapier, Integromat etc.)
I want to use a text field in my base to create a ‘tag’ in Toggl using the Toggl api;
The Toggl API documentation looks good, and I think I understand most of it, but I don’t know how to actually start - what is the first think I need to write?
All the toggl examples start with ‘curl’ e.g.
curl -v -u 1971800d4d82861d8f2c1651fea4d212:api_token \
-H "Content-Type: application/json" \
-d '{"time_entry":{"description":"New time entry","created_with":"API example code","start":"2012-02-12T15:35:47+02:00","duration":1200,"wid":31366}}' \
-X POST https://api.track.toggl.com/api/v8/time_entries
Is this what I would paste into the script editor?
I assume I need the toggle api url somewhere ( api.track.toggl.com) so the script knows where to get/post the data but I don’t know where or how to add this url.
Can someone please point me in the right direction?
Cheers!