Integrating video player widget with virtual currency rewards

Using Virool API

Getting started:

  1. You must be registered and approved as a publisher on Virool. Go to to register.
  2. Go to My Sites and click on “Add new site”

  3. Fill in all the details about your site or blog. Set site type as “Online Game”. Please make sure that you set all categories and keywords to the best of your knowledge.

  4. Fill in your virtual currency name (Gold, Points, Gems, Credits, etc) and conversion rate. If 1 point equals 1 cent, the rate will be 0.01, if it’s half-cent, then 0.005 etc.

  5. Fill in your callback URL

  6. Save your site.

  7. On the My Sites page, you will find your site key and links to various integration methods.

To integrate our API

1a) Make client-side json call to[YOUR_SITEKEY].json?userId=[VISITOR_ID]

Or if you want to get all available offers and not just the best offer, add /all:[YOUR_SITEKEY]/all.json?userId=[VISITOR_ID]

1b) Make server-side json call to[YOUR_SITEKEY].json?userId=[VISITOR_ID]&ip_address=[VISITOR_IP]

Or, if you want to get all available offers, not just the best single offer, add /all:[YOUR_SITEKEY]/all.json?userId=[VISITOR_ID]&ip_address=[VISITOR_IP]

You can use additional parameters:

Key Type Example value Comment
key String 8a70422 Site key
userId String 12341 Internal user ID in your app
String IP address of your visitor. Use this param to get the right selection of offers while making a server-side call to API.
String male, female Gender of user
String YYYY-MM-DD (e.g. 1987-10-25) Date of birth
Integer 640 Frame width in pixels, min value: 290. Default value 640
Integer 360 Frame height in pixels, min value is 190. Default value 360
Integer 21314231521 Dynamic parameter to prevent request from being cached

2) Your response will look like:

  "data": {
     "status": "OK",
     "offer": { 
       "title": "Havaianas",
       "description": "Please watch this short video to earn 6 Gems",
       "campaignId": 4353,
       "offerImg": "",
       "currencyName": "Gems",
       "reward": 6,
       "rewardText": "6 Gems",
       "offerType": "video",
       "offerLength": 13,
       "viewsToDeliver": 3743,
       "targetGender": "a",
       "targetAgeGroups": "0",
       "targetPlatforms": ["blogs","mobile","social"],
       "targetSystems": ["mobile-android","mobile-ios","desktop-all"],
       "targetCountries": ["US","CA","GB","DE","BR","FR"],
       "keywords": ["indie rock","alternative music","rock music","concert","music"],
       "width": 640,
       "height": 360,
       "url": "",
       "mobileUrl": "",

3) You can analyze results on your side, and if you are happy with our offer, render the provided URL into iframe on your site. If you don’t like it (for example if you have better offers from other services), you can just ignore it.

<iframe src="[URL]" height="[WIDTH]" width="[HEIGHT]" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe>

4) If our offer is shown and a visitor watches video with it, we will credit money to your account and hit your site callback URL, so that you can reward your user.