Skip to content

Latest commit

 

History

History
96 lines (60 loc) · 3.25 KB

wix-app-tutorial.md

File metadata and controls

96 lines (60 loc) · 3.25 KB

Tutorial: Create your first Wix Application on your machine

In this tutorial we go over how to create a Wix Application that interacts with the Wix platform that you will can submit to the Wix App Market, where Wix site owners can deploy it on their sites.

1. Set up your app in a Wix Developers account

A. Go to Wix Developers and login/signup to Wix Developers. B. Click

Create New App

You should get this screen:

Create New App

C. Go to Workspace > OAuth and copy your App ID and App Secret Key. You will need them later.

Create New App

********* D. Go to Workspace > Webhooks and copy your Public key. You will need it later.

2. Create and run your app

A. Download and install npm

B. Clone the Wix Sample Application to your machine

C. In the config.js file (in the src folder):

  • find and replace the APP_ID with the value you copied from Wix Developers: Create New App
    ********* - find and replace the PUBLIC_KEY with the value you copied from Wix Developers: ********* Create New App
    D. In the credentials.js file (in the src folder) find and replace the APP_SECRET with the value you copied from Wix Developers: Create New App

E. Run your app

  • Browse to the cloned sample application
  • Run npm install
  • Run npm build
  • Run npm start

You should get something like this:

Listening

3. Set up the application to receive inbound HTTPS connections

Since most developers machine are not open for inbound connection and don't have HTTPS certificates, we will use ngrok. If you are hosting your application on a server without these restrictions, you can skip this step.

A. Install and run ngrok

Start an HTTP tunnel on the port your app is listening on (default is 3000) You should get something like this:

ngrok screen

Don't close the ngrok process - You will need it running for the entire process.

B. Set up your application URLs

  • Go to Workspace > OAuth
  • in Redirect URL enter: https://<12345678>.ngrok.io/login
  • in App URL enter: https://<12345678>.ngrok.io/signup
    Remember to replace '12345678' with ** your ngrok string you got above. for example:

Listening

update application urls

Don't forget to click Save.

save

Well done! Now it's time to make sure your app works as expected.

4. Test your app

A. Click Test Your App test your app

B. Select a site and click Test Your App

site selector

C. When prompted, click Add To Site:

site selector

D. Provide consent for the app to collect data by clicking Allow and Install:

site selector

E. You should get a print into the browser with your application ID and your site instance ID: site selector

Congrats, you're done!

Now you can add your Application logic and Other WIX APIs.