This document explains the REST API and resources provided by VWO. The REST APIs allow you to integrate VWO data with a third-party tool, and lets you get deeper insight of your VWO data. VWO REST API can be used by developers to create applications on VWO platform, or for personal use by users to retrieve VWO campaign data for their specific purpose.
The following are the steps to perform for developers who want to create a third-party application on VWO and use VWO data with any external tool:
- Create a third-party application using VWO interface
- Request user authorization for the application
- Retrieve data from VWO APIs using the access token granted for the user
For Regular Users
The following are the steps to perform for regular users who would just need to create tokens to query VWO using the API:
- Generate a token using VWO interface
- Use the token to query VWO API
Create a third-party application
- Go to VWO application and navigate to the Developer link in the footer of the application as displayed in the following screenshot:
- Click Developers to access the VWO developer dashboard
- Alternately, you can also access the developer dashboard by clicking on http://app.vwo.com/#/developers.
Note: If you are already signed in to VWO, you will be automatically redirected to the developer dashboard. If not signed in, you will be taken to the login screen.
- To view and manage tokens generated for applications, click the Tokens tab.
- Click Add Another API Token to create a token to authorize API access for applications or users. You can copy and share the token using this section.
- Click the Applications tab to view and manage applications integrated with VWO.
- Click Add Another Application to add a new application and integrate with VWO.
Add new application
Under the Application section, click Add Another Application to create a new application for integration with VWO.
- Enter the following information about the application:
- Application Name - Enter a unique name for the application to help you identify it easily.
- Description - (Optional) Enter a brief description about the application and what it does.
- URL - URL of the application. You can leave the field blank if you are developing a desktop application. Redirect URL - (Optional) URL at which you want to redirect users after they authorize your application via VWO’s dashboard.
Permission - Define a permission level for the application. You can assign any of the following access level for the application:
- Admin - The highest level of the hierarchy in VWO. Admin can create users and define access permission to each user , create sub-accounts, delete users or accounts.
- Publish - Can modify to campaigns, and start or stop campaigns.
- Design - Can create campaigns but cannot start or stop the campaigns.
- Browse - Can only view campaigns.
- Click Create to complete the creation process.
To make the user authorize your application, you need to redirect the user to the authorization URL(http://app.vwo.com/#/authorize/:applicationId). For example, http://app.vwo.com/#/authorize/123456, where 123456 is the application id. User is asked to login into VWO account, after which the choice to choose the account for which your application will get the required access, is displayed. When the authorization is complete, VWO grants an access token for the application and redirects the user back to the application (to the redirect url you have specified while creating the application) along with the access token as part of the query parameter. If the redirect has not been specified while creating the application, the user will see the authentication token inside VWO, which can then be copied and shared by the user with the application.
Generate API tokens
Any user who wants to use third-party application for integration will need an Application token to use the application. Regular users can generate and authorize API tokens using VWO. Each API request is authenticated by a token in the request header.
Follow these steps to generate a token:
- For any third-party application you create using the Developer Dashboard, VWO generates an Application token for each application. To view or manage application tokens, select Settings, Accounts, and click Apps option. For personal use, you can generate API tokens to run queries on VWO. Click here to view existing tokens or generate a new token.
- To generate a new token, click the Tokens tab in the Developer dashboard.
- To generate a new authorization token, click Add Another API Token and then enter a name for the token the access permission for the user as displayed in the following screenshot:
- Click Generate to create a new token.
View authorized apps in your account
Follow these steps to view the list of all applications in your account that are authorized to access your VWO account data:
- Click Settings and select Accounts tab in your VWO dashboard.
- Select the Apps sub-tab under Accounts. The list of all application authorized to use your VWO data are listed as displayed in the following screenshot: