Getting Started

From Developer.stickam.com

Jump to: navigation, search

Contents

Introduction

Stickam has opened up its system to allow developers to create their own application that will allow their own users to start and join a live session and add a group chat feature. Calls to return public data from Stickam.com are also available, so developers can present these data on their application their own way.

Read our how to guide and API Rest-like Specification to see what calls and features are available. Also, see the restrictions below, which has a list of some of the limitations on the API.

Validation

All Stickam API calls require validation. Developers using the Stickam API system will need to register for an API and secret keys. API key identifies your application and will have to be passed on all API calls. Stickam API system also require a MD5 hash of all the parameter values being passed in along with the Stickam generated secret key as well as a unique incrementing number.

Required parameters for ALL Stickam API calls
Name Type Description
key string Unique key that identifies your application. This is assigned to you after you register for an API account.
rid long Unique request id (rid = request_id) for every call. This number has to be unique and incrementing for every subsequent call. We recommend using current time in milliseconds.
sig string The signature of the current call, which is a MD5 hash of the current request values, request_id, and your secret key. Value for sig is generated as follows: md5(concatenate(request_param_values_in_alphabetical_order_of_param_names,secret_key,rid))
  • Code Example in Java to generate sig value:
   
	public class UrlParam implements Comparable<UrlParam> {
		String name;
		String value;
		public UrlParam(String name, String value) {
			this.name = name;
			this.value = value;
		}
		public int compareTo(UrlParam o) {
			return name.compareTo(o.name);
		}
	}

	String secretKey = "yourSecretKey";
	String apiKey    = "yourApiKey";
	long requestId   = System.currentTimeMillis();
        
	UrlParam param1 = new UrlParam("sk_user_id", "1235678");
	UrlParam param2 = new UrlParam("session_id", "KJDFSKDH134");
	String signature = generateSigValue(param1, param2);  // GENERATED SIG VALUE

	public  String generateSigValue(UrlParam... params)
	{

		// Add API key
		UrlParam[] paramsWithApiKey = new UrlParam[params.length + 1];
		paramsWithApiKey[0] = new UrlParam("key", apiKey);
		System.arraycopy(params, 0, paramsWithApiKey, 1, params.length);
		
		// sort params
		Arrays.sort(paramsWithApiKey);
		
		// Add sig and rid
		UrlParam[] paramsWithSigRid = new UrlParam[paramsWithApiKey.length + 2];
		System.arraycopy(paramsWithApiKey, 0, paramsWithSigRid, 0, paramsWithApiKey.length);
		paramsWithSigRid[paramsWithApiKey.length] = new UrlParam("sig", secretKey);
		paramsWithSigRid[paramsWithApiKey.length + 1] = 
                                     new UrlParam("rid", String.valueOf(requestId++)); 
		
		
		// concatenate parameter values
		StringBuilder sb = new StringBuilder();
		for (UrlParam param : paramsWithSigRid) {
			String value = param.value;
			if (value != null && !value.isEmpty()) {
				sb.append(value);
			}
		}
		
		// MD5 parameter values
		String toSigValues = sb.toString();	
		MessageDigest md = MessageDigest.getInstance("MD5");
		try {
			md = MessageDigest.getInstance("MD5");		
		} catch (Exception e) {
		
		}
		md.update(toSigValues.getBytes());
		byte[] digest = md.digest();

		StringBuffer hexString = new StringBuffer();

		for (int i = 0; i < digest.length; i++) {
			toSigValues = Integer.toHexString(0xFF & digest[i]);
			if (toSigValues.length() < 2) {
				toSigValues = "0" + toSigValues;
			}
			hexString.append(toSigValues);
		}
		return hexString.toString();
	 }

Restrictions

Restriction
1 You will need a valid Stickam account in order to register for a Stickam API key.
2 All API requests requires that you have a valid pair of Stickam API and secret keys.
3 You can only call APIs with method POST for users that you have created or users who belong to your Stickam API site. Please see each API call to see which ones have the POST method.
4 You can only get the player embed code for host chat live session and group chat live sessions for users that you have created or users who belong to your Stickam API site.
5 Each API site has a limit on the number of API requests it can call per day. By default this is 20000.

Note: This value will change after we analyze the API traffic data, growth, and performance. It will also change in the future once we introduce the pricing model for the API.

6 Each API site has a limit on the number of viewers who can join and view per live session. By default this is 10.

Note: This value will change after we analyze the API traffic data, growth, and performance. This will change in the future once we introduce the pricing model for the API.

7 The players used in the API are the same players available on the Stickam website. These players are currently not customizable.
8 Media uploads can only be done from the Stickam.com website.

Response Codes

Code Description
0 Success
1 Missing required parameter(s)
2 Invalid date
3 Age is under 14
4 User name already exists
5 Invalid user name
6 Email address already exists
7 Invalid number
8 No user found
10 User account is already disabled
11 User account is already active
12 Gender must be 'M' or 'F'
14 Invalid room name
15 Room name already exists
16 Invalid display name(contains offensive or reserved word)
17 Invalid email format
44 Invalid status
45 Invalid session id
46 No session found
47 No group chat found
48 Invalid player type
49 Player type already exists
50 Exceeded the maximum players allowed
51 No player found
52 Invalid media type
100 Unknown Error
200 Invalid API key
201 Cannot request POST method for user that was not created by the API caller
202 Invalid sig (or signature) value
203 Invalid request ID value
204 Request limit has been reached by the API caller

Glossary

Term Category Definition
active site status User has a valid registered Stickam account. This user can login and access the members' area of Stickam system.
API key site identifier A parameter passed in for all API requests. API key is a key that identifies your application. This is assigned to you after you register for an API account. Every API call requires that the API key value is passed in (param name is “key”).
banned (or admin banned) site status User has been banned from logging in and accessing the members' area of the Stickam system. Users are banned for violating the terms of service of Stickam.
chatter live session user role User who joins and chats in the host’s live session. A chatter can be a non-Stickam member, a Stickam member or a Stickam friend of the host.
disabled site status User has been disabled from Stickam.com. A disabled user cannot login and access any members' area of the Stickam system. Users can request to have their Stickam account be disabled.
everyone live session user role Refers to a chat privacy setting on live sessions. This privacy setting will allow Stickam members as well as non-members to join the live session and chat with the host.
friends live session user role Refers to a chat privacy setting on live sessions. This privacy setting will only allow the Stickam friends of the host to join the live session.
GCS group chat session player A type of flash player specifically for group chat sessions.
group chat session type Group chats are sessions created by any user based on an interest or topic, which is different from a live session, which is based on a host. Stickam members can create any group chat rooms with any specific topic they want to discuss and any Stickam member interested in this topic can join in and start chatting. The difference with live session and group chat is that there are more slots for the videos and any Stickam member can join in public group chats and start their video. The group chat stays open until the last person leaves the chat.
group chat creator group chat session user role Group chats can be created by any Stickam member. The creator of the group chat can start a chat about any topic and has a choice of whether to make it public or password protected. The creator of the group chat also has the ability to select other members in the group chat as mods.
HCLS host chat live session player A type of flash player for live sessions specifically used by host.
host live session user role Initiates the live session. The host requires being a Stickam member before going live.
live session session type Or go live or live session. A live session on Stickam refers to a real-time web video and audio broadcast, which also incorporates real-time video, audio, and text chat interaction with viewers.
lurker live session user role User who just watches the live session and does not join and does not chat in the host’s live session. A lurker can be a non-Stickam member, a Stickam member or a Stickam friend of the host.
members live session user role Refers to a chat privacy setting on live sessions. This privacy setting will only allow Stickam members to join the live session.
mod live and group chat session user role The host and/or Stickam Admin can assign a user, who has the privilege to kick viewers out of the live host chat session if they are disrupting the live session or group chat session. A mod needs to be a Stickam member.
public cam live session video setting Refers to a video setting to display the host’s video on the Stickam player. If public cam is ON, then the host’s live video will show up on the Stickam player. If public cam is OFF, then the host’s default media will show up on the Stickam player.
rid required parameter A parameter passed in for all API requests. A Unique number increasing for every successive calls. We recommend using current time in milliseconds.
secret key site identifier A parameter passed in for all API requests. Secret key is a pass code key paired with your API key to identify your application. Treat this key like your API account password. Every API call requires that the secret key is MD5 hashed with other parameter values for that call. Do not share this key.
sig required parameter A parameter passed in for all API requests generated by the following method:

md5(concatenate(request_param_values_in_alphabetical_order_of_param_names,secret_key,rid))

Stickam Admin live and group chat session user role Stickam Admins are the big brothers of the live host chat session. They can monitor the live session to make sure that the host and the viewers are following Stickam's terms of service. They are also there to answer questions or help if there are any issues in the live session.
viewer live session user role User who watches and/or joins and chats in the host’s live session. Chatters, lurkers, mods, stars, and admins are considered viewers. A viewer can be a non-Stickam member, a Stickam member or a Stickam friend of the host.
VCLS viewer chat live session player A type of flash player specifically only for viewing and joining for live sessions.

Players

Name Image
stickam-160x160 player_160x160.jpg
stickam-160x400 player_160x400.jpg
stickam-340x290 player_340x290.jpg
stickam-400x160 player_400x160.jpg
stickam-480x210 player_480x210.jpg
stickam-480x480 player_480x480.jpg
stickam-820x490 player_820x490.jpg
Personal tools