Unsubscribe WebHook sends HTTP GET instead of POST

681 views
Skip to first unread message

Ed Carrel

unread,
Apr 28, 2011, 8:53:29 PM4/28/11
to MailChimp API Discuss
Hi MailChimps,

I am currently working a project to wire mailchimp unsubscribe
notifications into our database of subscription info here.

The server on our end is running Rails behind Apache, and the path
mailchimp hits is just a typical Rails route.
We currently have a webhook configured for one of our mailing list to
send callbacks whenever a user unsubscribes. We are getting responses
back, we can see them in both our apache and rails logs.

However, these come back as GET calls, when the webhook documentation
says they ought to be POSTs. None of the post body data mentioned in
the Webhook API docs appears to get passed back in the query string.
I'm not sure if anything comes across in the body of the request --
it's possible it does, and the request handler here never checks
because it doesn't expect anything to be there on a GET.

Clarifying questions are welcome, and ideas on how to narrow this down
are appreciated.

Best,

Ed Carrel
Wetpaint.com

jesse

unread,
Apr 28, 2011, 11:08:23 PM4/28/11
to MailChimp API Discuss
Our URL verification does send a GET request. Actual Webhooks will
send a POST.

I'll look into the possibility of doing the URI verification via POST
instead of a GET.

If you are talking about something I've missed, please elaborate.


jesse

Ed Carrel

unread,
Apr 29, 2011, 8:14:16 PM4/29/11
to MailChimp API Discuss
On Apr 28, 8:08 pm, jesse <je...@mailchimp.com> wrote:
> Our URL verification does send a GET request. Actual Webhooks will
> send a POST.

Sorry if this wasn't clear, but the GET we saw was from an non-
verification callback where a user had just unsubscribed; it was a
test user we set up for the purpose of testing our response to the
callback.

Earlier in the logs, we did see the GET verifying the existence of the
endpoint.

Hopefully adds a little clarity to what are seeing.

Ed Carrel
Wetpaint.com

jesse

unread,
May 1, 2011, 11:55:10 AM5/1/11
to MailChimp API Discuss
Not sure what you really saw, but that's not possible.


jesse

Ed Carrel

unread,
May 4, 2011, 2:39:43 PM5/4/11
to MailChimp API Discuss
On May 1, 8:55 am, jesse <je...@mailchimp.com> wrote:
> Not sure what you really saw, but that's not possible.

Yeah, you're right. The logfile we have here was recording things in a
bit of a weird way, and I was misinterpreting what it was telling me.
Sorry about that. What I was actually seeing was the webhook validator
sending requests my way.

The webhook interaction still doesn't look right, though. The
validator success hits our endpoint, and the webhook page reports that
the hook has been updated, and we have the hook configured to send us
unsubscribe events when a change is made either by the subscriber or
the account admin.

From this point, we unsubscribe a test user using the unsubscribe link
included in the "you're subscribed" email. Unfortunately, we don't get
a callback about this unsubscribe. There are a few things worth noting
about the callback URL we provided: it uses HTTPS; it uses a numerical
IP address instead of a hostname; and, it has a query string off the
end of the URL.

Thoughts and ideas on this are welcome. Is there a way to see the
state of pending requests our callback, and what is causing them to
fail?

Ed Carrel
Wetpaint.com

jesse

unread,
May 4, 2011, 6:49:48 PM5/4/11
to MailChimp API Discuss
Have you double checked that you have the "user" source turned on for
the list you are testing? I see 2 of your lists that don't have those
enabled.

There's not currently a way to see failed calls, though your server
has to be down for at least an hour and a half for our retries to not
work.


jesse

Daniel Willemse

unread,
Oct 24, 2013, 9:56:11 AM10/24/13
to mailchimp-...@googlegroups.com
I just ran into the same problem.
Turns out, I was forcing https via redirection server side and I didn't set https in my webhook url.
Redirections are HTTP GET and any POST data is lost.

I know this thread is way out of date but after the MailChimp support couldn't really help me I stumbled upon this post (without a solution).
It took me a few hours after that to solve it, so I'm just posting it here for the next person in need :)


Op donderdag 5 mei 2011 00:49:48 UTC+2 schreef jesse:
Reply all
Reply to author
Forward
0 new messages