Integration Guide v 1.2.3
Nov 6, 2018
This guide will introduce you to the basics and benefits of Streamate blacklabels and help you integrate with our API.
In this section, youâll learn about the features of blacklabels and how they compare to whitelabels.
What is a blacklabel?
A blacklabel is a seamless integration of Streamateâs live cam content on your website. Using multiple API endpoints and the Live Show client, your siteâs members can search for performers, view their details, and spend money on paid shows directly on your website.
The Live Show client enables users to watch live free and paid shows, and chat with the performers. Free shows require no authentication, but if one of your users wants to watch a paid show, they can link their existing Streamate account or provide new payment information.
What does it look like?
Blacklabels are fully customizable and can use the content provided by Streamateâs API to perfectly integrate live cam content within your existing website and branding.
How does it work?
Integrating with Streamate content requires:
Working with Streamate to become a blacklabel partner
An existing user account system with user login validationâyou must be able to validate your own users before attempting to authorize access to Streamate content
Making API calls to Streamateâs external services to get content
Hosting Streamateâs Live Show client loader for viewing performer shows
Setting up a whitelabel to enable billing and account management
What is the difference between a blacklabel and a whitelabel?
Blacklabels and whitelabels are similar but have different features and implementations.
affinitycamslive.com (whitelabel) vs. affinitycams.com (blacklabel)
A whitelabel (seen above on the left) is hosted by Streamate. It skins the Streamate content to match the affiliateâs branding. The domain is registered by Streamate and whitelabel owners use Streamateâs Cambuilder tool to design and configure it. Usage and revenue data is tracked by Streamate and visible in Cambuilder.
The advantages of a whitelabel include:
Easy to set up and edit
No user distractions
Low developer investment required
A blacklabel (seen above on the right) is hosted by you and is completely custom-built. Blacklabels use their existing site to host Streamate content by making external API calls and using the retrieved data to populate search results, performer information, and more. The Live Show client is placed somewhere on the affiliateâs existing site so that users can watch and chat with live performers.
The advantages of a blacklabel include:
100% customizable appearance and branding
All hosted by you on your websiteâno domain switching
The blacklabel product enables you to integrate the following Streamate features on your own website:
Authenticate users (logins and signups)
Search for performers
View a performerâs details and albums
Watch a performerâs show using the Streamate Live Show client
Authentication with a Streamate server is required for users to participate in paid shows. If a blacklabel user has already had Streamate credentials created for them for that blacklabel, they will be logged in. If a blacklabel user does not have an existing Streamate account, the blacklabel must submit user data that Streamate can use to create one.
Authenticating a user with existing blacklabel and Streamate accounts
The following diagram shows how Streamate authenticates blacklabel users with linked Streamate accounts. To fully authenticate, a user must have a valid status and valid payment data on file with Streamate:
To authenticate an existing user:
The blacklabel makes a service call to Streamateâs /auth endpoint, posting the required user data (see the âAuthorization Operationâ section later in this guide).
Streamate validates the HMAC data and confirms that the hash is valid and not expired.
Streamate checks the state of the user.
a. If the user account is in good standing, the payment information is checked.
i. *If the payment information is good*, the authorization service returns an sakey. The blacklabel client should reload the Live Show component using this keyâthe user is now logged in and can begin spending. ii. *If the payment information is bad (missing or flagged as invalid)*, the authorization service will return SM_REQUIRES_BILLING_DATA. The blacklabel client should prompt the user to provide billing information (see âCreating a Streamate Accountâ below), then direct the user to the destination specified in returnUrl.
b. If the user account is not in good standing, the authorization service returns SM_REQUIRES_SUPPORT. The blacklabel client should direct users to Streamateâs live chat (<whitelabel>/supportchat.html) for support.
Creating a Streamate account
If a blacklabel attempts to authenticate a user (see above), but no matching Streamate account is found, the user will need to provide their billing data.
The following diagram shows how Streamate collects a userâs payment information and sends it to a payment processor.
To add payment information for a user:
- If the blacklabel doesnât have a blacklabel userid, email, and country for the user, it should collect it (or create it, in the case of the userid).
You can optionally use the /userexists endpoint to check if Streamate already has details for this user (see the âUser Exists Operationâ section later in this guide). You still need to collect user data, in case the email and password do not exactly match a Streamate account.
- The blacklabel forwards the users to the matching whitelabelâs /blacklabel/paymentinfo/ page (an HTTPS redirect, not a cURL request) with the query parameters below appended. Note that a trailing slash should be included as such: /blacklabel/paymentinfo/?parameter=value
|The userâs email address.||Yes|
|password||The userâs password.||Yes|
|clientUserId||The blacklabelâs user ID.||Yes|
|nickname||The userâs desired nickname. (Users with nicknames that violate Streamateâs standards will be given a temporary nickname.)||Yes|
|country||The userâs country.||Yes|
|zip||The userâs zip code. (Required in US only.)||Yes (US only)|
|returnURL||The URL to redirect the user to at the end of the process.||Yes|
|firstname||The userâs first name.||No|
|lastname||The userâs last name.||No|
|address||The userâs street address.||No|
|city||The userâs city.||No|
|state||The userâs state.||No|
|lang||The user's language (two letter code, uppercase/case sensitive)||No|
|trackingid||A numeric value used to group revenue for tracking purposes||No|
|referrerKey||A flexible value that can be used for any kind of tracking||No|
Streamate saves the user data, identifies an appropriate payment processor, and redirects the user to the processorâs form. (This step is a pass-through process and should not be visible to the user.)
On the processorâs form, the user enters their payment information, making any corrections required by the processor.
The processor saves the payment data and sends the results to Streamate.
The processor redirects the user back to the Streamate server.
When Streamate receives valid payment data from the processor, it:
a. Creates a Streamate user account
b. Creates an sakey
c. Forwards the user to the page specified in returnUrl
When the blacklabel client receives the sakey, it should reload the Live Show component using the new sakey.
Looking for information about AFNOs? You can mark joins the same way you would with an AFNO by passing in the trackingid and referrerKey fields mentioned above to your whitelabelâs /blacklabel/paymentinfo/ page.
Searching for performers
Blacklabels can use the Search List endpoint to display a list of performers that includes their photo and other personal details like their username, age, location, online status, and so on.
Running an âemptyâ search will return the default search results.
Running a search using any combination of available parameters will return only the matching results. If, for example, you use the keyword âbrunette,â your search results will only include performers who use the word âbrunetteâ somewhere in their performer details.
Blacklabels can also use the Search Categories endpoint to request a list of categories for users to pick from, with the number of online performers in each category. This lets the user filter their