You are here

function bbb_api_generate_querystring in BigBlueButton 7

Same name and namespace in other branches
  1. 6 includes/api-0.64.bbb.inc \bbb_api_generate_querystring()
  2. 6 includes/api-0.7.bbb.inc \bbb_api_generate_querystring()

Generate a signed query string

2 calls to bbb_api_generate_querystring()
bbb_api_call in includes/api.bbb.inc
Connect to BBB API and return response.
bbb_api_join in includes/api.bbb.inc
Join Meeting (join)

File

includes/api.bbb.inc, line 242
BigBlueButton - Enables universities and colleges to deliver a high-quality learning experience.

Code

function bbb_api_generate_querystring($params = array(), $call = '') {
  $query = array();

  // URL encoding the parameters
  foreach ($params as $key => $value) {
    $query[] = $key . '=' . drupal_encode_path(trim($value));
  }

  // Putting it together
  $query_string = implode('&', $query);

  // Adding the checksum to query string and return
  $query_string = $query_string . '&checksum=' . sha1($call . $query_string . BIGBLUEBUTTON_SECURITY_SALT);
  return $query_string;
}