referral([campaignParams,])

Access the user's referral methods for a given referral program.

import { ChainvineUser } from '@chainvine/sdk';

const userClient = new ChainvineUser(
   '0x393849393430', 
   {
      apiKey: 'S3CR37C0D3Z',
   }
);

const campaignId = 'siojdp2no';

const campaignParams = {
  campaign: {
     id: campaignId
  }
};

const userReferral = userClient.referral(campaignParams);

Params

Param
Required
Description

campaign.id

yes

the id of the program/campaign the user should be added to. Note: this campaign/program must belong to your account.

Response

Last updated