HomeAppVirality DocsWeb IntegrationIntegration Steps

Integration Steps

A comprehensive guide to integrating your Web app or Web Platform with AppVirality’s dedicated WEB API.

This would be fairly quicker & easier as compared to other platforms’ integration procedures.

Kindly use the same APPKEY for all platforms

If you have registered your iOS or Android Application already and want to run the same referral campaign on your Web Platform as well, refrain from registering freshly on AppVirality again.
Use the same App Key obtained from the initial registration.

App Key
App Key

AppVirality supports Web Referral program through API.
Refer to the API documentation for details.

The base URL for running web referrals is: https://api.appvirality.com

Referral program on web purely runs on user Email ID

To participate in the web referral program, the user must be registered with a valid Email ID and logged in.
In case user is not logged in, please prompt him to signup and start referring friends.

When a user clicks on “Invite & Earn” button on web, please check if the user is already ‘Logged In’ or not. If not, prompt the user to LogIn to begin referring.

On Signup, call AppVirality API with user details where EmailId field is mandatory. All the provided input parameters will be stored only if the user email has not already been registered.

For already registered users, you must be having the userkey. Please send the userkey in input parameter to get the user referral link and referral code.

In response to the call, basic information along with the user’s referral link is provided, which is required for further communication with the API.

POST /v2_0/registerwebuser

Content-Type application/json

{
"apikey":"176502556c624614b913a62400ab4d7e",
"userkey":"624614b913a62400ab4d7e624614b91",
"privatekey":"8b05ee42d9c941698bbba44c00cc32d1",
"avClick":"23de-e3f31",
"ReferrerCode":"e3f31",
"isExistingUser":"false",
"EmailId":"myemail@domain.com",
"AppUserName":"Myname",
"UserIdInstore":"HYD78890",
"ProfileImage":"http://mywebsite.com/images/profile.png",
"Phone":"918927266283",
"city":"Hyderabad",
"state":"Telangana",
"country":"India"
}

avClick

Query string parameter “avClick” will be available if the user visits the website, by clicking on the referral link.

This click ID is used to identify the referrer for this user

Input Parameters
{
"userkey": "176502556c624614b913a62400ab4d7e", 
"shareurl":"http://r.appvirality.com/67bfc-da",
"referralcode":"67bfc",
"isExistingUser":true,
"hasReferrer":true,
"success": true,
"message": null
}
Response Parameters

Use the share URL received in STEP-1 and append it to the share message intended for personalizing the “Invite Friends” feature on your web platform.
Example message: “Register with xyz and earn $10 reward, use my referral link to get it: http://r.appvirality.com/67bfc-da

This will reward the users based on the configured Campaign Reward Rules.

 

This is to show welcome messages to the new user by showing his referrer name and profile picture. Use “avclk” received in URL query parameters to complete this call.
This call is useful for a lot of other purposes too, wherein you’d like to personalize the customer journey. This call helps you with the details of the referrer to a newly acquired customer, if he has any.

GET /v2_0/getreferrer/{avClick}

Content-Type application/json


Input Parameters
:
avClick = AppVirality Click ID, this is query string parameter avclk value – and this will be available when a user visits your website by clicking on a referral link

   
   v2_0/getreferrer/olc-2f36
{
"userkey": "2e6cf59c57d14f50b1ffa62000d9d69a",
"UserIdInstore": null,
"name":"my Name",
"email":"mymail@domain.com",
"referralcode":"67bvc",
"profileimage":null,
"success": true,
"message": null
}
Response Parameters

After successful completion of “registerwebuser” API call, you are ready to send the conversion event. Please visit the Register Conversion Event on how to Register Conversion event.

This will reward the users based on the configured Campaign Reward Rules.

 

Use this call to check the referrer/friend available balance and under review credits. If the user participated in multiple campaigns, it returns multiple records with reward details for each campaign.

Please visit the Get User Balance i.e. Friend/Referrer on how to get user balance.

Live Sample : http://referral.appvirality.com

 

Use this call to register an email as a test user. This will allow to register using the same email after reset.

NOTE – It is mandatory to click on “Add Test Device” button in the AppVirality Dashboard >> Testing page before you execute this call. It will give a window of 30 sec to register the email for testing.

POST /v2_0/addtestdevice

Content-Type application/json

{
"apikey":"004d37de619e41777eb7a4f800715468",
"privatekey":"0ef86e6ee69017abb18aa50900554688",
"email":"test1998@gmail.com"
}
Input Parameters

 

{
  "success": true,
  "message": null
}
Response Params
Output Params Description
success returns true on successful execution
message Information regarding API call (if relevant)

 

THAT CONCLUDES THE WEB REFERRAL INTEGRATION SETUP

You should now explore the Testing Guide for testing your integration & troubleshooting your Referral Campaign

Was this article helpful to you? Yes 2 No