# Setting hook secrets using auth0-deploy-cli

**URL:** <https://community.auth0.com/t/setting-hook-secrets-using-auth0-deploy-cli/37350>\
**Category:** Get Help\
**Tags:** hook, auth0-deploy-cli, auth0-deploy, hooks\
**Created:** [February 4, 2020, 10:49am UTC](https://community.auth0.com/t/setting-hook-secrets-using-auth0-deploy-cli/37350 "2020-02-04T10:49:22Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jelle](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/jelle/32/12681_2.png) [@Jelle](https://community.auth0.com/u/Jelle)\
**Post date:** [February 4, 2020, 10:49am UTC](https://community.auth0.com/t/setting-hook-secrets-using-auth0-deploy-cli/37350/1 "2020-02-04T10:49:22Z")

</div>

Hi,

Im trying to add hook secrets to my environment using the auth0-deploy-cli tool. The documentation on this is not (yet) complete and I dont know the correct format/ syntax.

What I’ve got so far; Directory setup:

- Root
  - clients
  - connections
  - .. etc
  - hooks
    - name-of-my-hook.js
    - name-of-my-hook.json (copied from Rules setup)

  - hook-secrets
    - aws.json (this contains an object with secret key pair values)

I’m using version `4.0.0` of the `auth0-deploy-cli`.

After deployment my hook is correctly deployed, but the secrets are not available in the hook.

What am I doing wrong?

Maybe you guys can update this page containing some examples.

> **[Keyword Replacement - Auth0 Docs](https://auth0.com/docs/deploy-monitor/deploy-cli-tool/keyword-replacement)**
>
> Learn how to manage a multi-tenant workflow with the Auth0 Deploy CLI using keyword replacement.

---

<div class="post-metadata">

**Author:** ![Chipadeedoodah](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/chipadeedoodah/32/13646_2.png) [@Chipadeedoodah](https://community.auth0.com/u/Chipadeedoodah)\
**Post date:** [February 4, 2020, 7:29pm UTC](https://community.auth0.com/t/setting-hook-secrets-using-auth0-deploy-cli/37350/2 "2020-02-04T19:29:04Z")

</div>

Hi @Jelle,

Thank you for the feedback on the Auth0 documentation. I’ve shared it with our docs team and they’re prioritizing an update to answer your questions. Look for it later this week.

In the meantime, the example code in the deploy-cli repo on Github might help:

> **[auth0-deploy-cli/examples/directory/hooks at master · auth0/auth0-deploy-cli](https://github.com/auth0/auth0-deploy-cli/tree/master/examples/directory/hooks)**
>
> master/examples/directory/hooks

Thanks again!

---

<div class="post-metadata">

**Author:** ![Jelle](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/jelle/32/12681_2.png) [@Jelle](https://community.auth0.com/u/Jelle)\
**Post date:** [February 5, 2020, 9:41am UTC](https://community.auth0.com/t/setting-hook-secrets-using-auth0-deploy-cli/37350/3 "2020-02-05T09:41:03Z")

</div>

Hi,  
Thanks for the fast reply! Found it in the repo.

For others looking for the same thing; Add your hook secrets in the corresponding hook config file (the .json file as shown above) using:  
`"secrets": { mysecretKey: "mySecretValue" }`

The secrets object can not be a nested object so prefix your secrets 🙂

Would be nice to see the documentation updated.

Thanks!

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [February 5, 2020, 1:04pm UTC](https://community.auth0.com/t/setting-hook-secrets-using-auth0-deploy-cli/37350/4 "2020-02-05T13:04:35Z")

</div>

Thanks a lot for sharing it with the rest of community @Jelle!

---

<div class="post-metadata">

**Author:** ![Chipadeedoodah](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/chipadeedoodah/32/13646_2.png) [@Chipadeedoodah](https://community.auth0.com/u/Chipadeedoodah)\
**Post date:** [February 7, 2020, 10:28pm UTC](https://community.auth0.com/t/setting-hook-secrets-using-auth0-deploy-cli/37350/5 "2020-02-07T22:28:07Z")

</div>

The doc updates are now live!

> **[Import/Export Tenant Configuration to YAML File](https://auth0.com/docs/deploy-monitor/deploy-cli-tool/import-export-tenant-configuration-to-yaml-file)**
>
> Learn how to use the YAML option for importing and exporting tenant configurations with the Auth0 Deploy CLI Tool.

> **[Import/Export Tenant Configuration to Directory Structure](https://auth0.com/docs/deploy-monitor/deploy-cli-tool/import-export-tenant-configuration-to-directory-structure)**
>
> Learn how to use the directory option for importing and exporting tenant configurations with the Auth0 Deploy CLI Tool.

We really appreciate your feedback, please let us know what you think about the changes.

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [February 10, 2020, 2:44pm UTC](https://community.auth0.com/t/setting-hook-secrets-using-auth0-deploy-cli/37350/6 "2020-02-10T14:44:38Z")

</div>

Thanks for the news Chip!

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [February 25, 2020, 2:44pm UTC](https://community.auth0.com/t/setting-hook-secrets-using-auth0-deploy-cli/37350/7 "2020-02-25T14:44:43Z")

</div>

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.
