WooCommerce Error: unable to grant permission errors – Missing parameter app_name – 404 Not Found – the requested URL was not found on this server

You are here:
< All Topics

there are 2 errors that can happen when authenticating:

  • Missing parameter app_name
  • 404 Not Found – the requested URL was not found on this server

If an error appears when installing and authenticating the plugin, there are a few things you can check.

 

Do you have the WPML plugin installed?

We’ve seen this issue in several sites that used the WordPress Multilingual (WPML) plugin. Affected sites were running versions > 4.4.6.

WordPress Multilingual Plugin has reported an error with their most recent versions which affects other plugins or themes utilizing endpoints like wc-auth/v1. This is the case with Product Recommendation Quiz. This error causes API endpoints to be incorrectly url-encoded to something like wc-auth%2Fv1.

The WPML developers are aware of the issue, and they have a ticket which is still open to address it:

https://wpml.org/errata/endpoints-containing-slashes-are-incorrectly-encoded/

What you can do is temporarily deactivate the WPML plugin, grant access to Product Recommendation Quiz and reactivate WPML again.

 

Check the URL

If you’re getting a 404 error after granting access to the plugin, it’s possible that the callback URL has an error:

In the URL in your browser, replace the following characters: %2F for a forward slash /

So it reads something like this: /wc-auth/v1/ …

Then reload the page.

If you’re being forwarded to your main page after clicking “grant permissions” it is also possible that your page may be adding an extra /wp/ in the URL. Removing the /wp/ section from the URL manually should allow you to grant permissions to the app.

Was it installed on a live website?

Product Recommendation Quiz needs to be installed on a live website. The website needs to be public and not hidden by a “site under construction” plugin. These plugins usually disable the WooCommerce API and it needs to be open for our server to be able to connect.

Once you’ve installed the Product Recommendation Quiz on a live website, you can hide it again and work on your quiz incognito.

 

Check WordPress REST API

The most probable cause to this issue is that your WordPress REST API isn’t active. An easy way to test if this is your case is navigate to the following URL on your store (replacing “yourstore.com” for your domain):

https://yourstore.com/wp-json/

If you’re getting a “Not Found” error, it’s possible that you need to fix your WordPress installation.

As you can see, in these sites it is working and returning a JSON:

It’s a problem with the WordPress REST API in your site and not with the WooCommerce REST API.

You’ll have to contact your developer to further investigate this issue because it’s out of our app’s scope.

 

Check JSON format

Sometimes, the following error occurs:

This means that even if your site returns a JSON it may not be in the correct format. The WordPress API is returning a response that is encoded as text/html. Normally, it should be application/json.   This is related to your store or server settings, but can also be influenced by another plugin. It is recommended to check it with your developer and fix it. 

Table of Contents

Install the app and get started today

Add a Product Recommendation Quiz to your store and start offering a personalized shopping experience