you need to
1) OmGateway::login [1]
2) OmGateway::getSecureHash
options need to be
array('recordingId' => $recId)
That's it :)))
[1]
https://github.com/openmeetings/openmeetings-api-plugin/blob/master/src/main/scripts/OmGateway.php#L54
[2]
https://github.com/openmeetings/openmeetings-api-plugin/blob/master/src/main/scripts/OmGateway.php#L91
On Thu, Sep 8, 2016 at 7:07 PM, Andre Wruszczak <[email protected]> wrote:
> I accept the cost J
> Will do as soon as I get my recording hash to work J
>
> Currently I am doing the following steps :
>
>
>
> Method one :
>
> 1) Get the needed RecordingID
>
> 2) Use the gateway->getSecureHash function with “recordingId” set to
> my RecordingId in the $options
>
> 3) Accessing the hash now gives me following exception (There is no
> such room available. The event in the calendar and connected room is
> already deleted.)
>
>
>
> Method two :
>
> 1) Get the needed RecordingID
>
> 2) Create the room using the gateway->updateRoom() function
>
> 3) Use the gateway->getSecureHash function like mentioned above
>
> 4) Accessing the hash now opens a normal room and not the recording.
>
>
>
> What am I doing wrong?
>
>
>
> With lots of regards
>
> - Andre!
>
>
>
> P.S : Thanks for all the help up to now Maxim, I highly appreciate it!
>
>
>
> *Von:* Maxim Solodovnik [mailto:[email protected]]
> *Gesendet:* Friday, September 2, 2016 4:58 AM
> *An:* Openmeetings user-list <[email protected]>
> *Betreff:* Re: Cannot reproduce REST API example
>
>
>
> Sure,
>
>
>
> but this would be not for free ... :)))
>
> Please try 3.1.3-SNAPSHOT and edit API Wiki :))
>
>
>
> so to get links to Recording you need:
>
> 1) create hash as before BUT set recordingId instead of roomId here: [1]
>
> 2) go to link http://localhost:5080/openmeetings/hash?secureHash=YOUR_HASH
>
>
>
> or if you want to download single file you need to use :
> http://localhost:5080/openmeetings/recordings/*avi*/YOUR_HASH
>
> Instead of *avi *you can use flv, mp4, ogg, jpg
>
>
>
>
>
> [1] http://openmeetings.apache.org/openmeetings-db/apidocs/org/apache/
> openmeetings/db/dto/room/RoomOptionsDTO.html#
> setRecordingId(java.lang.Long)
>
>
>
> On Fri, Sep 2, 2016 at 12:16 AM, Andre Wruszczak <[email protected]> wrote:
>
> Ah I see !
> So I guess in some cases I was logged in the actual Openmeetings
> application and cached my session and then I was able to see the
> recording.
> Would you mind sharing how to get the other URL? J
>
>
>
> Cheers
>
> Andre
>
>
>
> *Von:* Maxim Solodovnik [mailto:[email protected]]
> *Gesendet:* Thursday, September 1, 2016 7:09 PM
>
>
> *An:* Openmeetings user-list <[email protected]>
> *Betreff:* Re: Cannot reproduce REST API example
>
>
>
> BTW recording by id is only available to logged in OM user
> To view recording by external user you need other URL
>
> WBR, Maxim
> (from mobile, sorry for the typos)
>
>
>
> On Sep 1, 2016 23:24, "Maxim Solodovnik" <[email protected]> wrote:
>
> You can edit the wiki, I'll check your corrections :))
>
> I'm currently testing 3.1.3 with Moodle (hopefully will be released next
> week) will check all issues which will arise
>
>
>
> On Thu, Sep 1, 2016 at 11:20 PM, Andre Wruszczak <[email protected]> wrote:
>
> Thanks, would be nice to write the specifics (what rights the soap user
> needs, as well as that he needs to be assigned to a group) to the wiki!
>
> Any ideas about the other issues?
> Or how I could provide more useful information about those?
>
> Thanks for the quick reply ~
>
>
> Cheers
> Andre
>
>
>
> *Von:* Maxim Solodovnik [mailto:[email protected]]
> *Gesendet:* Thursday, September 1, 2016 6:17 PM
> *An:* Openmeetings user-list <[email protected]>
> *Betreff:* Re: Cannot reproduce REST API example
>
>
>
> To be able to login SOAP user additionally need:
>
> 1) Login permission
>
> 2) Must have at least one group assigned
>
>
>
> Users are being created in OM Database on room enter
>
>
>
>
>
> On Thu, Sep 1, 2016 at 10:04 PM, Andre Wruszczak <[email protected]> wrote:
>
> Haha, yeah you are definitely right. Thanks for linking the wiki too, it
> helped quite a bit!
>
> Currently I managed to get all my core functionalites to work via the
> OmGateway and OmRestService.
> I have two issues though, first of all I created a user with just
> SOAP-Rights, but if I use that user for getting my sid etc. I get the hash
> and everything, but when I try to use the hash, I get an “unknown error,
> please contact your administrator” which is weird – I tried again with
> SOAP/ROOM/LOGIN/DASHBOARD- Rights and it worked.
> Is this intentional?
>
> I also checked my openmeetings log and it said that “ Level Room ::
> [DENIED]”
>
> Ah and I noticed that unlike before (Version 3.02) the new method with
> your plugin creates a new user with the same name and lastname in the
> om_database, when I create a room (only the first time I create a room,
> successive openings do not create the same user more than once)
>
>
>
> Second issue is, I am currently listing all recordings of a single room
> and get their ID, then I use that ID to construct an url to the recording :
> http://myom.com:5080/openmeetings/recordings/mp4/recordingID .
>
> This normally works, but sometimes (especially after first logging in) the
> user gets a 404 for the recording. After waiting 1-2 minutes it
> miraculously always works. What could be the issue here?
>
> Also I found that Recordings are very unreliable if their length is under
> 5 seconds (they get an error, saying something (varies, sometimes
> flvRecordingId.jpg, sometimes ffmpeg itself) was not found), under 15
> seconds recordings often lack an image and are just playing sound,
> everything above 15 seconds I nearly never have problems with.
>
>
>
> Help would be very appreciated.
>
>
>
> Cheers
>
> Andre
>
> *Von:* Maxim Solodovnik [mailto:[email protected]]
> *Gesendet:* Monday, August 29, 2016 4:21 PM
> *An:* Openmeetings user-list <[email protected]>
> *Betreff:* Re: Cannot reproduce REST API example
>
>
>
> This is why I have created API :)))
>
> basic how-to is here: https://github.com/openmeetings/openmeetings-api-
> plugin/wiki
>
>
>
> code to create room: https://github.com/openmeetings/openmeetings-api-
> plugin/blob/master/src/main/scripts/OmGateway.php#L116
>
>
>
> On Sat, Aug 27, 2016 at 10:04 PM, Andre Wruszczak <[email protected]>
> wrote:
>
> Thank you very much – it definitely helped!
>
> Looking at the plugin, I managed to successfully call getRoomHash in order
> to log in to rooms.
>
> But right now I am creating rooms, whenever I want to login to one (with
> add – which causes several rooms with the same name).
> Instead I would prefer using the getExternal method in the RoomWebService
> – but I am not sure how to send the RoomDTO as a query parameter – I tried
> several ways and none worked so far. (I would get an internal server error
> like seen in the attachment (500 an error occurred while parsing the query
> filter ….))
>
>
>
> Would you mind sending me an example call to the getExternal Rest Endpoint?
> As far as I know there is no general way of accepting DTOs as a query
> parameter, especially when there are 2 ( for example this is definitely not
> the right way to call ?sid=sid&room=name=…) so I would highly appreciate an
> example in order to see how to send the sid and the room dto as query
> parameters.
>
>
>
> Thanks in advance!
>
>
>
> Cheers
>
> Andre
>
>
>
>
>
>
>
>
>
>
>
>
>
> *Von:* Maxim Solodovnik [mailto:[email protected]]
> *Gesendet:* Friday, August 26, 2016 8:02 AM
> *An:* Openmeetings user-list <[email protected]>
> *Betreff:* Re: Cannot reproduce REST API example
>
>
>
> This is why I have created PHP API [1] :)))
>
> I guess you need to take a look at this [2] line
>
> It will not work if both params will be encoded
>
>
>
> [1] https://github.com/openmeetings/openmeetings-api-plugin
>
> [2] https://github.com/openmeetings/openmeetings-api-
> plugin/blob/master/src/main/scripts/OmGateway.php#L97
>
>
>
> On Fri, Aug 26, 2016 at 3:00 AM, Andre Wruszczak <[email protected]> wrote:
>
> Dear Openmeetings-Team!
> Thank you for submitting the REST API Sample on your homepage!
> I am currently struggling with reproducing the ajax call shown in the
> sample with php.
>
>
>
> My url is pretty much this = http://localhost:5080/
> openmeetings/services/user/hash?sid=SOMEVALIDSID
>
>
>
> I am preparing the data like this :
>
> $user = array(
>
> 'firstname' => 'John',
>
> 'lastname' => 'Doe',
>
> 'externalId' => 'uid1',
>
> 'externalType' => 'myCMS',
>
> 'login' => 'superjohn');
>
> $roomOptions = array(
>
> 'roomId' => 5,
>
> 'moderator' => true,
>
> 'showAudioVideoTest' => true);
>
>
>
> $data = json_encode(array('user' => $user, 'options' => $roomOptions),
> JSON_FORCE_OBJECT);
>
>
>
> And curl it like this :
>
> $curl = curl_init();
>
> curl_setopt_array($curl, [
>
> CURLOPT_RETURNTRANSFER => 1,
>
> CURLOPT_POST => 1,
>
> CURLOPT_POSTFIELDS => $data,
>
> CURLOPT_URL => $url,
>
> CURLOPT_USERAGENT => 'Reproducing’,
>
> CURLOPT_SSLVERSION => 3,
>
> CURLOPT_SSL_VERIFYHOST => 0,
>
> CURLOPT_SSL_VERIFYPEER => 0
>
> ]);
>
>
>
> I tried it many times with different versions of the data etc. and I
> always get either (415 unsupported media type) or (500 Internal Server
> Error) without any (at least for me) helpful further informations.
>
> I have included one of the error.html.
>
>
>
> I would really appreciate some help at this stage. Maybe I should send the
> request with the “wadl” in the url?
>
>
>
> Thanks in advance,
>
>
>
> -Andre
>
>
>
>
>
>
>
>
>
> --
>
> WBR
> Maxim aka solomax
>
>
>
>
>
> --
>
> WBR
> Maxim aka solomax
>
>
>
>
>
> --
>
> WBR
> Maxim aka solomax
>
>
>
>
>
> --
>
> WBR
> Maxim aka solomax
>
>
>
>
>
> --
>
> WBR
> Maxim aka solomax
>
--
WBR
Maxim aka solomax