Retrieve a task
package main
import (
"context"
"fmt"
"github.com/ramensoft/handinger-go"
"github.com/ramensoft/handinger-go/option"
)
func main() {
client := handinger.NewClient(
option.WithAPIKey("My API Key"),
)
task, err := client.Tasks.Get(context.TODO(), "tsk_01HZY31W2SZJ8MJ2FQTR3M1K9D")
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", task.Task)
}
{
"task": {
"id": "tsk_2Z-YWz3hFq6VlW",
"completedAt": "2026-05-11T09:14:48.000Z",
"createdAt": "2026-05-11T09:14:22.000Z",
"createdByUserId": "usr_7yh-91XzM2nQ4",
"organizationId": "org_8s1Df9aLp-1z",
"status": "completed",
"title": "Weather report for Barcelona",
"totals": {
"credits": 42,
"durationMs": 25812,
"turnCount": 1
},
"triggeredBy": "api",
"url": "https://v3.handinger.com/worker/wrk_vk81XUHKHG-qr4/task/tsk_2Z-YWz3hFq6VlW",
"workerId": "wrk_vk81XUHKHG-qr4"
}
}Returns Examples
{
"task": {
"id": "tsk_2Z-YWz3hFq6VlW",
"completedAt": "2026-05-11T09:14:48.000Z",
"createdAt": "2026-05-11T09:14:22.000Z",
"createdByUserId": "usr_7yh-91XzM2nQ4",
"organizationId": "org_8s1Df9aLp-1z",
"status": "completed",
"title": "Weather report for Barcelona",
"totals": {
"credits": 42,
"durationMs": 25812,
"turnCount": 1
},
"triggeredBy": "api",
"url": "https://v3.handinger.com/worker/wrk_vk81XUHKHG-qr4/task/tsk_2Z-YWz3hFq6VlW",
"workerId": "wrk_vk81XUHKHG-qr4"
}
}