You must have an online store (Woocommerce), if not do it first then get back and continue

Step 1: Wordpress config

If you’re using non-pretty permalinks Woocommerce REST API will not work. Config pretty permalinks in Settings > Permalinks so that the custom endpoints are supported.

Config permalinks link.

Step 2: Woocommerce config

Pre-generated keys can be used to authenticate use of the REST API endpoints. New keys can be generated either through the WordPress admin interface or they can be auto-generated through an endpoint.

Generating API keys in the WordPress admin interface

To create or manage keys for a specific WordPress user, go to WooCommerce > Settings > Advanced => REST API> Keys/Apps.

Generating API keys.

Click the "Add Key" button. In the next screen, add a description and select the WordPress user you would like to generate the key for. Use of the REST API with the generated keys will conform to that user's WordPress roles and capabilities.

Choose the level of access for this REST API key, which can be Read access, Write access or Read/Write access. Then click the "Generate API Key" button and WooCommerce will generate REST API keys for the selected user.

Now that keys have been generated, you should see two new keys, a QRCode, and a Revoke API Key button.

If the WordPress user associated with an API key is deleted, the API key will cease to function. API keys are not transferred to other users.

Consumer Key and Consumer Secret will use to config on the App.

Step 3: Install RNLAB App Control plugin

Install this plugin to your web store.

Wordpress plugin

Then open App control

Click to settings under plugin name

or Settings => RNLAB - App Control on the Wordpress menu sidebar left

Add config

Open file wp-config.php and add this config, don't forget change xxxxxxxxxxx with your content. This file is located in the root of your WordPress file directory and contains your website’s base configuration details, such as database connection information.

define('JWT_SECRET_KEY', 'xxxxxxxxxxx'); // It like password, type any string you own
define('FB_APP_ID', 'xxxxxxxxxxx');
define('FB_APP_SECRET', 'xxxxxxxxxxx');

Read more about JWT to undestand JWT_SECRET_KEY

Config Facebook App id, App secret and JWT secret

Step 4: Enable user register


For more information on what to do next, we recommend the following article: