Skip to navigation

Revoke the session token

View as Markdown

Take the session token away from the execution: no link opens it in the widget any more.

Use it the moment a link must stop working — your customer finished on your own screens, the case was closed, a link went somewhere it should not have —, whether the execution is still running or has closed. The execution itself is untouched: it keeps running or stays closed, you still follow it, read its results and delete it as before, and Answer and resume keeps working.

StatusMeaning
204Revoked. No body.
304The execution had no token. Nothing changed — revoking twice is safe, and this is the second answer, not an error.
404No such execution for your application, or it has been deleted.
409It is not one of your direct executions: a flow launched it, and its person carries it on through that flow’s own session — there is no token of its own to revoke.

Revoking is not final while the run goes on. Issue a session token whenever your customer needs the widget again: it gets a new token and a new link. Once the execution has closed, a revoked token stays revoked. And you never need to revoke before deleting — deleting the execution takes its token with it.

Server to server only. This call is authorised with your application secret: it belongs in your backend, never in a browser, a mobile app or anything your customer can read.

Authentication

X-APP-SECRETstring
Application Secret

Path parameters

execution_idstringRequiredformat: "object-id"
The execution, as the acceptance response returned it.

Response

204 No Content
Revoked. Every link built with it opens nothing from now on; the execution is untouched. No body.

Errors

404
Not Found Error
409
Conflict Error
422
Unprocessable Entity Error