Troubleshooting: Zapier Integration
authorization failed: (404) Not Found
Make sure you have activated the add-on/plugin.
authorization failed: Your API key is missing.
If you entered your API key and still see this message, then your server is running CGI/FastCGI. This can be worked around by opening your htaccess file on your server, and adding this line:
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
Solution 2
If you continue getting this message after adding this to your htaccess, you may need to contact your web host and ask them to allow this line to work on your site. On some hosts where that rewrite rule has failed, this combination has succeeded. First, use this in your htaccess instead of the line included above:
<IfModule mod_rewrite.c> RewriteEngine on RewriteCond %{HTTP:Authorization} ^Basic.* RewriteRule (.*) index.php?Authorization=%{HTTP:Authorization} [QSA,L] </IfModule>
Then this can go in your theme functions.php or a snippet in the Code Snippets plugin:
if ( false !== strpos( $_SERVER['REQUEST_URI'], '/zapier_api/' ) ) { add_action( 'wp_loaded', 'set_auth_to_server', 9 ); } function set_auth_to_server() { if ( isset( $_GET['Authorization'] ) && ! isset( $_SERVER['PHP_AUTH_USER'] ) ) { if ( preg_match('/Basic\s+(.*)$/i', $_GET['Authorization'], $auth ) ) { list( $_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW'] ) = explode( ':', base64_decode( $auth[1] ) ); } } }
All Else Fails? Authenticate via the URL and a Filter.
1) Add the API Key to the end of the url.
For example, http://yoursite.com/zapier_api/1420YQ-B3N7G-SII2D-5CGC1/
2) Add this filter to your functions.php file: