Sponsors
Manage sponsorships based on your business requirement using sponsor resource.
A sponsor is an object that is created on the Application level in the Producer Site. Sponsor maintains a many to many relationship with Programs and Chatrooms which can be managed in the Sponsors section of your application in the Producer Site
How to setup a sponsor?
Refer Creating a sponsor documentation. Based on your requirement, you can either link a sponsor to program, chatroom or widgets from our producer suite.
Retrieving Application Sponsor(s)
Get list of all sponsors created in a given application
API Definition: getApplicationSponsors
import { getApplicationSponsors } from "@livelike/javascript"
getApplicationSponsors()
.then((paginatedSponsors) => {
console.log(paginatedSponsors.results);
})
Retrieving Program Sponsor(s)
Now that you have linked sponsor(s) to a program, you will now be able to retrieve sponsor information through our SDK interfaces.
API Definition: getProgramSponsors
import { getProgramSponsors } from "@livelike/javascript"
getProgramSponsors({
programId: "<program id>"
}).then(paginatedSponsors => console.log(paginatedSponsors.results))
Retrieving Chatroom Sponsor(s)
Retrieve chatroom sponsors
API Definition: getChatRoomSponsors
import { getChatRoomSponsors } from "@livelike/javascript"
getChatRoomSponsors({
roomId: "room-id"
}).then(paginatedSponsors => console.log(paginatedSponsors.results))
Retrieving Widget Sponsor(s)
Widgets sponsors list is part of widget payload that could be retrieved using getWidget or getWidgets API.
Refer sponsors
property in IWidgetPayload
Updated 12 months ago