Get Started with APIs

You can use our various APIs to access Wix users' site data (e.g., contacts, orders, etc.). To do so, site owners must grant you explicit permission to collect this data when installing your app.

To ensure that you have the relevant permissions to access this data, we use OAuth 2.0 to authorize you to access our APIs and receive webhooks.

All our API calls are available in our technical docs.

Here's what you need to do:

  1. Create a dashboard component
  2. Set up your OAuth flow
  3. Call an API

1. Create a dashboard component

A dashboard component is where a site owner manages the app – this exists on the backend and won't be visible on the live site. For a seamless experience, we recommend integrating your app's dashboard into the Wix Dashboard.

2. Set up your OAuth Flow

We use OAuth 2.0 to authorize your app to access our APIs and apply webhooks. Learn how to set up OAuth, permissions, and webhooks in the Wix Developers Center.

Important:

Never ask for more permissions than are required for your app to function as intended. If you intend to add new functionality in the future that'll require additional permissions, let us know when you submit your app.

3. Call an API

Once you've set up OAuth and Permissions in the Wix Developers Center, and you have users who have completed the OAuth flow successfully, you can call our APIs to get relevant data.

Every time you call an API, you'll need to use the refresh token you received during the OAuth flow to request a new access token. 

  1. Request an access token:
Copy
1
curl -X POST \
2
https://www.wixapis.com/oauth/access \
3
-H 'Content-Type: application/json' \
4
-d '{
5
"grant_type": "authorization_code",
6
"client_id": <APP_ID>,
7
"client_secret": <APP_SECRET>,
8
"code": <AUTH_CODE>
9
}'
  1. We’ll respond with a new access token:
Copy
1
{
2
"refresh_token": <REFRESH_TOKEN>,
3
"access_token": <FRESH_ACCESS_TOKEN>
4
}
  1. Call our API, adding an authorization header with the value of the new access token:
Copy
1
curl -X GET \
2
https://www.wixapis.com/apps/v1/instance \
3
-H 'Authorization: <FRESH_ACCESS_TOKEN>' \
  1. You will get this response:
Copy
1
{
2
"instance": {
3
"appName": "My New App 166",
4
"appVersion": "0.3.7",
5
"instanceId": "3e507642-0d65-439a-8c15-1c8882e8cf30",
6
"isFree": true,
7
"permissions": [
8
"WIX_DEVELOPERS.MANAGE_APP_INSTANCE",
9
"WIX_STORES.READ_ORDERS"
10
]
11
},
12
"site": {
13
"locale": "en",
14
"multilingual": {
15
"isMultiLingual": false,
16
"supportedLanguages": []
17
},
18
"paymentCurrency": "USD",
19
"siteDisplayName": "mysite-25"
20
}
21
}
Was this helpful?
Yes
No