BombBomb makes it easy to build relationships with simple videos. Use this JavaScript API to record a video on your website, email it within a clean, beautiful design, and receive detailed analytics on opens, click and plays. With the free BombBomb app you can receive push notifications and respond right away when someone interacts with your email.
To begin, include the BBCore
and jQuery
libraries in your html (The latest version is available at https://s3.amazonaws.com/static.bombbomb.com/js/BBCore.min.js
):
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script type="text/javascript" src="//s3.amazonaws.com/static.bombbomb.com/js/BBCore.min.js"></script>
Then instantiate BBCore:
var bb = new BBCore({ accessToken: '<your api key>'});
Take a look in the examples/
directory to see some example implementation.
Embed a video recorder on your website and record to a BombBomb account without leaving your site.
Create a video recorder and save a recording by calling startVideoRecorder()
, specifying a css selector target
into which you would like the recorder to appear.
bb.startVideoRecorder({ target: '#recorderDiv'}, function (vidInfo) {
if (confirm('Is this the take you would like to save?')) {
bb.saveRecordedVideo('Our video!', vidInfo.videoId, vidInfo.filename, function (data) {
alert('Your video has been saved!');
});
}
});
IMPORTANT NOTE: If you intend to reuse the same BBCore object, it's HIGHLY recommended you call getNewVideoGuid() prior to calling startVideoRecorder. However, it's recommended that you otherwise destroy the BBCore object after the recorder has completed and create a new one.
Wrap your video in a nicely designed template, add a personal written message if you like, and press send.
To send a video in your default template, use videoQuickSend()
.
bb.videoQuickSend({
subject: 'Your Subject Line',
video_id: vidInfo.videoId, // saved from the earlier call
email_addresses: 'test@emailaddress.com',
mobile_message: "Simple message to include"
}, function (data) {
alert("You've sent a video! " + data.info);
});
Have your system be notified in real-time as events happen in your customer's BombBomb account. BombBomb's Webhooks make it easy to keep your system up to date.
bb.sendRequest('AddWebHook', {
hookUrl: '<Your Listener URL>'
});
View your email opens, link clicks and video plays. When you can see how people are interacting with your emails and videos you'll know exactly when to follow up.
Download the free BombBomb app for your iOS or Android device and enable realtime notifications. View contact details or respond from your mobile device with one click.
userEmail: string
userId: string
clientId: string
accessToken: string
currentVideoId: string
email: string
onerror: string
Adds a Contact BBCore.contact to Contacts collection
Parameters
contact: contact
, Adds a Contact BBCore.contact to Contacts collection
Returns: contacts
Returns the first matched contact from
Parameters
fieldName: string
, Name of the field to search for the value
value: string
, Value to search for in the contacts
Returns: * | BBCore.contact
Adds a Video to the collection
Parameters
video: video
, Adds a Video to the collection
Returns: videos
resumeStoredSession: , DEPRECATED - Use validateSession
Authenticates a user using their Email Address (User Id) and Password
Parameters
uid: string
, Authenticates a user using their Email Address (User Id) and Password
pwd: string
, Authenticates a user using their Email Address (User Id) and Password
success: responseSuccess
, Authenticates a user using their Email Address (User Id) and Password
Returns bool for whether or not a prior authentication is stored locally
Returns: boolean
Save credentials to local storage (not recommended)
Parameters
uid: string
, User ID/Email Address
pwd: string
, Password
Authenticates from previously stored credentials
Parameters
onSuccess: responseSuccess
, Authenticates from previously stored credentials
onError: responseSuccess
, Authenticates from previously stored credentials
Parameters
onSuccess:
Returns bool for authentication state
Returns: boolean | *
Invalidates and clears the active session, similar to logout
Returns: boolean | *
Validates the given key
Parameters
key: string
, Validates the given key
complete: responseSuccess
, Validates the given key
Stores the give session key, typically used so a session can be resumed later on.
Parameters
key: , Stores the give session key, typically used so a session can be resumed later on.
Validates the given key
Parameters
key: string
, Validates the given key
complete: responseSuccess
, Validates the given key
Stores the OAuth Token for API calls
Parameters
key: , Stores the OAuth Token for API calls
Returns: string
Parameters
authCode:
onSuccess:
onError:
Stores the give session key, typically used so a session can be resumed later on.
Parameters
key: , Stores the give session key, typically used so a session can be resumed later on.
Attempts to always return a valid JWT which makes an async verification request
Parameters
callback: , handler given a valid JWT. If the JWT is null then the user is NOT authenticated.
Returns: BBCore.apiServer | * | BBCore.CONFIG.SERVER_API_URL
Returns the fully qualified URL for BB API
Returns: string
Sends a request to the specified method of the BombBomb API
Parameters
method: string
, The method name to call
params: requestParameters
, The parameters to send with the request
success: responseSuccess
, A callback when the request succeeds
error: responseSuccess
, A callback when the request fails
Retrieves Contact Lists
Parameters
success: responseSuccess
, Retrieves Contact Lists
Creates a Contact List and returns the Guid
Parameters
listName: string
, Creates a Contact List and returns the Guid
success: responseSuccess
, Creates a Contact List and returns the Guid
Retrieves a Contact
Parameters
contactId: string
, Retrieves a Contact
success: responseSuccess
, Retrieves a Contact
Retrieves Contacts from a Contact List
Parameters
listId: string
, Retrieves Contacts from a Contact List
success: responseSuccess
, Retrieves Contacts from a Contact List
Adds a Contact to a Contact List
Parameters
contact: contact
, Adds a Contact to a Contact List
success: responseSuccess
, Adds a Contact to a Contact List
Adds a batch of Contacts
Parameters
opts: object
, Adds a batch of Contacts
success: responseSuccess
, Adds a batch of Contacts
Parameters
opts: object
success: responseSuccess
Retrieves an Import Address by a Type
Parameters
opts: , Retrieves an Import Address by a Type
success: responseSuccess
, Retrieves an Import Address by a Type
Retrieves an Import Address by a Type
Parameters
opts: object
, Retrieves an Import Address by a Type
success: responseSuccess
, Retrieves an Import Address by a Type
Retrieves a list of re
Parameters
opts: getClientInteractionOptions
, Retrieves a list of re
success: responseSuccess
, Retrieves a list of re
Retrieves a list of Emails from the current authenticated session
Parameters
success: responseSuccess
, Retrieves a list of Emails from the current authenticated session
Parameters
opts: customVideoEmailOptions
success: function
Parameters
opts: object
success: responseSuccess
Parameters
opts: object
success: responseSuccess
Parameters
opts:
success:
Parameters
options: Object
onComplete: function
Parameters
opts: object
onComplete: function
Parameters
title: string
videoId: string
videoFilename: string
success: function
vid_id: string
Parameters
options: Object
Deletes a Video
Parameters
videoId: string
, Deletes a Video
success: responseSuccess
, Deletes a Video
Parameters
opts: object
onSuccess: responseSuccess
reponseSuccess
Parameters
responseObject: , reponseSuccess
jqXHR: , reponseSuccess
Contact Object
email: string
, Email Address
firstname: string
, First Name
lastname: string
, Last Name
phone_number: string
, Phone Number
address_line_1: string
, Address 1
address_line_2: string
, Address 2
city: string
, City
state: string
, State
country: string
, Country**postal_code**:
string, Postal Code **company**:
string, Company **position**:
string, Position **comments**:
string, Comments **listlist**:
string, Array of List Ids the Contact is subscribed to **id**:
string` , Contact Id
vid_id: string
title: string
filename: string