Expand my Community achievements bar.

July 31st AEM Gems Webinar: Elevate your AEM development to master the integration of private GitHub repositories within AEM Cloud Manager.

Create room fails in PHP

Avatar

Level 2

Here is the error I get:

Warning: fopen(https://na2.collaboration.adobelivecycle.com:443/USERNAME): failed to open stream: HTTP request failed! HTTP/1.1 403 Forbidden in C:\temp\lccs.php on line 778 RTCError Object ( [message:protected] => connection-failed [string:private] => [code:protected] => 0 [file:protected] => C:\temp\lccs.php [line:protected] => 780 [trace:private] => Array ( [0] => Array ( [file] => C:\temp\lccs.php [line] => 288 [function] => http_post [class] => RTC [type] => -> [args] => Array ( [0] => https://na2.collaboration.adobelivecycle.com:443/USERNAME [1] => mode=xml&room=ROOMNAME&template=default&gak=cmVuZ2EqbmExcioxMmFjMzQ5MzFiMSo1MFBOMVE4V1dYMEszMkdTWlBGQkRXVjBYUg== [2] => Array ( ) ) ) [1] => Array ( [file] => C:\temp\index.php [line] => 105 [function] => createRoom [class] => RTCAccount [type] => -> [args] => Array ( [0] => ROOMNAME) ) ) )

Any ideas why? My code is something like:

ini_set('display_errors', 1);
$accountURL = "http://collaboration.adobelivecycle.com/USERNAME";
    require_once("lccs.php");
    $account =new RTCAccount($accountURL);
    $room    = "ROOMNAME";

    $devUsername = "USERNAME";
    $devPassword = "PASSWORD";
     $secret="SECRET";

    $roomURL = "{$accountURL}/{$room}";
    $displayName = "new";
    $role = 0;
$account->login($devUsername,$devPassword);

try {
  $account->createRoom($room);
} catch (Exception $ex) {
  print_r($ex);
  exit;
}

2 Replies

Avatar

Employee

Are you sure the room doesn't exist already ? Usually error 403 is returned if the room already exists.

It would be helpful if you send your account name and the room name you are trying to create. If you feel those are confidential info you can send me a private message.

Avatar

Level 1

Im also having the same problem. i get:

"Warning: fopen(https://na2.collaboration.adobelivecycle.com:443/darkbearroom) [function.fopen]: failed to open stream: HTTP request failed! HTTP/1.1 401 Unauthorized in /home/content/t/h/u/thung/html/classroom/lccs.php on line 792"

my call in php is

$newRoom = $am->createRoom("aroom","Classroom");

print_r($newRoom);

"aRoom" is not a room yet and "Classroom" is the template for the room.

its not a login issue because i can call listRooms() which returns an array of my rooms