M
M
Mobile app
Search…
Website Integration
This guide is used for the fresh Wodpress Installing, please follow these 5 easy steps and you are good to go (If you are using an existing site, please make sure to back up the database before running the import):
  1. 1.
    Install and activate the WooCommerce plugin.
  2. 2.
    Generate the WooCommerce REST API key and save them to your private file for later usage.
  3. 3.
    Woocommerce -> settings -> Advanced ->REST API -> Add key

Plugin Integration

  • You need to install the 2 plugins on your Wordpress website
  • Download "JWT and variable ", then upload and active this plugin on your website

Enable HTTP Authorization Header

  • Most shared hosts have disabled the HTTP Authorization Header by default.
  • To enable this option you’ll need to edit your .htaccess file by adding the following:
1
RewriteEngine on
2
RewriteCond %{HTTP:Authorization} ^(.*)
3
RewriteRule ^(.*) - [E=HTTP_AUTHORIZATION:%1]
Copied!

WPENGINE

To enable this option you’ll need to edit your .htaccess file by adding the following (see this issue):
1
SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
Copied!
Configure the Secret key
The JWT needs a secret key to sign the token. This secret key must be unique and never be revealed.
To add the secret key, edit your wp-config.php file and add a new constant called JWT_AUTH_SECRET_KEY.
1
define('JWT_AUTH_SECRET_KEY', 'your-top-secret-key');
Copied!
You can use a string from here

App Integration

Now we are going to connect your book store app to your website
  1. 1.
    Open .env file Change the URL to your website domain(e.g: https://demo.com ). Then replace the consumer key and consumer secret you created in the previous section (Website Integration).