How to access secrets in hooks

So hooks have the lovely feature of secrets, you can read it everywhere!
How unfortune that at the same time you can read absolutely nowhere about how to actually access them in the hook… it’s neither process.env, nor context nor context.secrets.

So how to access set secrets in hooks?

Here’s the answer: Secrets live in context.webtask.secrets

Still I’m confused that this can not be found anywhere!

5 Likes

Baffled me too, and quite confusing that it lives on .webtask