Using token in webhooks

I would like to use a webhook for creating an entry in a guacamole database. Therefore I need a token for using the guacamole api getting it by authentificated with user and password. With curl it looks like this:

TOKEN=$(curl -s -k -X POST https://localhost/api/tokens -d 'username=admin&password=xxx' | jq -r .authToken)

This token can now be used in the header of a next curl command.
How can I do this with webhooks? Or must I use shellhooks for this case?
Kind regards

If the ask is “can I make webhooks make a call somewhere, pick something from the response and use the said thing in a following request” then I’m afraid you’d need shellhooks for that.

Would it be possible to generate the token once and use it every time the webhook fires?

1 Like

Yes, this is the ask :smiley:
No, it is not possible to generate the token once among others because of valid time.
So, I will have look at using shellhooks for this.