Invalid CSRF Token Terminating Workflow via Web API

Hi folks. We’re trying to implement workflow termination through the temporal web API and when we make the post request to

/api/namespaces/singer-activity-namespace/workflows/{workflow id}/{run id}/terminate

We receive a 403 Forbidden and the message “Invalid CSRF token”. We’re still able to use the API for listing workflows but encountering this error on web 1.7.1 and 1.9.0.

Any help shedding some light on this is greatly appreciated, thanks!

Temporal doesn’t provide an official REST API. I would recommend using official SDKs, gRPC client or tctls for this.

Which SDK are you using? Here is small example how to start and terminate a workflow exec with Java SDK.
For tctl, you can run
tctl wf terminate -h
to see the list of options you can pass to it.