# HTTP POST and a strange redirection error

**URL:** <https://integration.keap.com/t/http-post-and-a-strange-redirection-error/9454>\
**Category:** API Q&A\
**Created:** [August 8, 2017, 7:41pm UTC](https://integration.keap.com/t/http-post-and-a-strange-redirection-error/9454 "2017-08-08T19:41:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Keith\_Yager](https://sea1.discourse-cdn.com/flex019/user_avatar/integration.keap.com/keith_yager/32/1616_2.png) [@Keith\_Yager](https://integration.keap.com/u/Keith_Yager)\
**Post date:** [August 8, 2017, 7:41pm UTC](https://integration.keap.com/t/http-post-and-a-strange-redirection-error/9454/1 "2017-08-08T19:41:09Z")

</div>

Hello,

We’re trying to setup an action that sends an http post to a url, like

[test.com/deactivate](http://test.com/deactivate)

I’ve tested it with Postman and Paw and can confirm that under any other circumstance, the POST goes through successfully.

However when infusionsoft does it, we get a 301 redirection error, and absolutely no other information that tells us what’s going on.

Here’s the basic code:

```
public function deactivateUser()
{
$email = $_POST['Email'];
  if ($email) {
  $account = [[do db stuff]]
  if ($account) {
  return 'User deactivated';
  }
} else {
  return 'Email not found';
}

```

}

---

<div class="post-metadata">

**Author:** ![John\_Borelli](https://sea1.discourse-cdn.com/flex019/user_avatar/integration.keap.com/john_borelli/32/11880_2.png) [@John\_Borelli](https://integration.keap.com/u/John_Borelli)\
**Post date:** [August 9, 2017, 3:11pm UTC](https://integration.keap.com/t/http-post-and-a-strange-redirection-error/9454/2 "2017-08-09T15:11:00Z")

</div>

Generally this is most often do to TLS compatibility. We have worked around this with some by adding an http to https redirect in their .htaccess file on the server. Are you posting the https or no?
