Category:

Publishers: 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 http://virool.com/publisher to register.

2) Go My Sites and click on “+ Add new site” or “Click here”, if this is your first site.

 

my-sites

 

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. This is an URL that we will hit once user successfully watched our video and we will reward you with credits. URL can contain the following placeholders: [USER_ID], [TRACKING_ID], [REWARD], [REWARD_USD]. Using these parameters, you will be able to identify which user to be rewarded.

6) Save your site.

7) On the sites section, you will find your site key and links for various integration methods.

To integrate our API:

1a) Make client-side json call to

http://api.virool.com/api/v1/offers/[YOUR_SITEKEY].json?userId=[VISITOR_ID]

Or if you want to get all available offers and not just the best offer, add /all :

http://api.virool.com/api/v1/offers/[YOUR_SITEKEY]/all.json?userId=[VISITOR_ID]

1b) Make server-side json call to

http://api.virool.com/api/v1/offers/[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 :

http://api.virool.com/api/v1/offers/[YOUR_SITEKEY]/all.json?userId=[VISITOR_ID]&ip_address=[VISITOR_IP]

You can use additional parameters:

Key id Data type Example value Comment
key 32 character long hex string e.g. 8a70422e3377ef60fa4610eefb111111 Application’s key string to identify requester. Can be passed as standalone parameter or as a last part of the routes (like this http://api.virool.com/api/v1/offers/8a70422e3377ef60fa4610eefb111111)
userId string e.g. 12341 Internal user ID in your app
ip_address (optional) string e.g. 74.125.224.132 IP address of your visitor. Use this param to get the right selection of offers while making a server-side call to API.
gender (optional) string male, female Gender of user
dob (optional) string YYYY-MM-DD (e.g. 1987-10-25) Date of birth
width (optional) integer e.g. 640 Frame width in pixels, min value is 290. Default value 640
height (optional) integer e.g. 360 Frame height in pixels, min value is 190. Default value 360
d (optional) integer e.g. 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": "http://img.youtube.com/vi/tsHPj4g4XJw/0.jpg",
         "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": "http://api.virool.com/widgets/8a70422e3377ef60fa4610eefb111111/4353?suid=12341&height=360&width=640",
         "mobileUrl": "http://api.virool.com/widgets/mobile_offer/8a70422e3377ef60fa4610eefb111111/4353?suid=12341&height=190&width=290",
       }
    }
  }

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.

    

 

widget

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.

Comments