# Adding an authorization header for a webhook?

**URL:** <https://meta.discourse.org/t/adding-an-authorization-header-for-a-webhook/141013>\
**Category:** Development\
**Created:** [February 7, 2020, 7:14pm UTC](https://meta.discourse.org/t/adding-an-authorization-header-for-a-webhook/141013 "2020-02-07T19:14:22Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![tomve](https://avatars.discourse-cdn.com/v4/letter/t/9f8e36/32.png) [@tomve](https://meta.discourse.org/u/tomve)\
**Post date:** [December 1, 2020, 10:20am UTC](https://meta.discourse.org/t/adding-an-authorization-header-for-a-webhook/141013/4 "2020-12-01T10:20:18Z")

</div>

I have a similar requirement where I need to send the new user’s details to a Mailchimp list, and I ran into the same issue as described above. But I have got a solution/workaround for this issue.

Since the Mailchimp API uses [HTTP Basic authentication](https://mailchimp.com/developer/guides/marketing-api-conventions/#authentication-methods) when supplying the API key with your API request, you can also include the key in the [URL](https://en.wikipedia.org/wiki/Basic_access_authentication#URL_encoding) you’re calling (instead of the more common Authorization header).

So in my case I set the webhook payload URL to:  
`https://user:[my-api-key]@[my-dc].api.mailchimp.com/3.0/lists/[my-list-id]/members/`

And that seems to work fine as the user now gets added to the Mailchimp list successfully.

---

_[View the full topic](https://meta.discourse.org/t/adding-an-authorization-header-for-a-webhook/141013)._
