Re: REST API for OM

2017-07-26 Thread Jacob Ouanounou
FINE !!! GOT CONNECTION !!! Thank you Le 26/07/2017 à 17:49, Maxim Solodovnik a écrit : Try hash?secure=hash I guess this is the issue Check JS example page WBR, Maxim (from mobile, sorry for the typos) On Jul 26, 2017 22:27, "Jacob Ouanounou" >

Re: REST API for OM

2017-07-26 Thread Maxim Solodovnik
Try hash?secure=hash I guess this is the issue Check JS example page WBR, Maxim (from mobile, sorry for the typos) On Jul 26, 2017 22:27, "Jacob Ouanounou" wrote: > I use each hash only on time > > Le 26/07/2017 à 17:00, Maxim Solodovnik a écrit : > > Hash is one time only > It

Re: REST API for OM

2017-07-26 Thread Jacob Ouanounou
I use each hash only on time Le 26/07/2017 à 17:00, Maxim Solodovnik a écrit : Hash is one time only It is invalid after browser refresh etc. WBR, Maxim (from mobile, sorry for the typos) On Jul 26, 2017 19:40, "Jacob Ouanounou" > wrote: Thanx,

Re: REST API for OM

2017-07-26 Thread Maxim Solodovnik
Hash is one time only It is invalid after browser refresh etc. WBR, Maxim (from mobile, sorry for the typos) On Jul 26, 2017 19:40, "Jacob Ouanounou" wrote: > Thanx, > > I have implemented the as you kindly explained. > > I get a sessionId, then a hash ... everything seems OK.

Re: REST API for OM

2017-07-26 Thread Jacob Ouanounou
I have checked a little bit more : The reason why I got connected when I used the service keyword swf rather than hash is that I had another window of the breowser that was already connected to OM. So I still have the problem : ahen I try to connect using the hash code provided by OM, I get

Re: REST API for OM

2017-07-26 Thread Jacob Ouanounou
Thanx, I have implemented the as you kindly explained. I get a sessionId, then a hash ... everything seems OK. Ten I try to connect, using the $gateway->getUrl() ... When I use : http://35.157.227.184:5080/openmeetings/_*hash*_?secureHash=b68d0bc9-2537-4ad7-b3fb-b835a5311a5b=7=4 as

Re: REST API for OM

2017-07-26 Thread Maxim Solodovnik
Yes, It is already in a Wiki: https://github.com/openmeetings/openmeetings-api-plugin/wiki/1.-SOAP-REST-API-(in-PHP) it shows step-by-step how to: 1) create options: https://github.com/openmeetings/openmeetings-api-plugin/wiki/1.-SOAP-REST-API-(in-PHP)#create-config-array 2) perform login

Re: REST API for OM

2017-07-26 Thread Jacob Ouanounou
Thank you, Maxim. I had understood that everything was in OmGateway.php, but I still don't understand how to use it exactly. Do you have a sample php file that performs the sequence of calls : login -> hash -> Enter room ? What do you mean by "enhance wiki pages" ? Thanks Le 26/07/2017 à

Re: REST API for OM

2017-07-26 Thread Maxim Solodovnik
As and additiona/alternative documentation can be added to PHP files ... PRs are welcome :))) On Wed, Jul 26, 2017 at 5:37 PM, Maxim Solodovnik wrote: > Then check the code of https://github.com/openmeetings/openmeetings-api- >

Re: REST API for OM

2017-07-26 Thread Maxim Solodovnik
Then check the code of https://github.com/openmeetings/openmeetings-api-plugin/blob/master/src/main/scripts/OmGateway.php and enhance Wiki pages :) On Wed, Jul 26, 2017 at 5:33 PM, Maxim Solodovnik wrote: > I believe you can start from here: https://github.com/ >

Re: REST API for OM

2017-07-26 Thread Maxim Solodovnik
I believe you can start from here: https://github.com/openmeetings/openmeetings-api-plugin/wiki On Wed, Jul 26, 2017 at 5:27 PM, Jacob Ouanounou wrote: > I don't see which of the numerous files shows an example of connection to > OM classroom. > > I feel it would be easier to

Re: REST API for OM

2017-07-26 Thread Maxim Solodovnik
Have added user@ Examples can be found in our open source plugin for Moodle: https://github.com/openmeetings/openmeetings-moodle-plugin $gateway = new OmGateway(. config parameters as array here ); if ($gateway->login()) { $hash = $gateway->getSecureHash($gateway->getUser(

Re: REST API for OM

2017-07-26 Thread Maxim Solodovnik
For PHP I would recommend to use PHP API: https://github.com/openmeetings/openmeetings-api-plugin/tree/master/src/main/scripts On Wed, Jul 26, 2017 at 4:42 PM, Maxim Solodovnik wrote: > Could you please tell me how are you call the service? > > Example on

Re: REST API for OM

2017-07-26 Thread Maxim Solodovnik
Could you please tell me how are you call the service? Example on http://openmeetings.apache.org/RestAPISample.html requires jquery, so it cannot be _just used_ To use REST you need client able to send GET/POST/etc. requests. Which one are you using? The error you are getting doesn't make sense

Re: REST API for OM

2017-07-26 Thread Jacob Ouanounou
Back to REST API : I succeed to get the SID, but when I try to get the hash, using excatly the code written there : http://openmeetings.apache.org/RestAPISample.html , with the sid I obtained, I get an error (in the console of the browser) :

Re: REST API for OM

2017-07-26 Thread Jacob Ouanounou
THANK YOU MAXIM ! It works fine ... Le 26/07/2017 à 09:10, Maxim Solodovnik a écrit : you have to escape your password using JS escape function or urlescape written in any pther language On Wed, Jul 26, 2017 at 1:53 PM, Jacob Ouanounou wrote: Hi Maxim, I have found in the

Re: REST API for OM

2017-07-26 Thread Maxim Solodovnik
you have to escape your password using JS escape function or urlescape written in any pther language On Wed, Jul 26, 2017 at 1:53 PM, Jacob Ouanounou wrote: > Hi Maxim, > > I have found in the log file (in file : 0.0.0.0_access..2017-07-25.log) the > lines corresponding to my

Re: REST API for OM

2017-07-26 Thread Jacob Ouanounou
Hi Maxim, I have found in the log file (in file : 0.0.0.0_access..2017-07-25.log) the lines corresponding to my trials to connect. The request I did (URL) is reproduced without the special characters in the password. It seems logical, since GET mode alters the special characters. The

Re: REST API for OM

2017-07-25 Thread Maxim Solodovnik
You can search it on your server :) it should be located in "log" folder under the folder you have unpacked openmeetings On Tue, Jul 25, 2017 at 7:11 PM, Jacob Ouanounou wrote: > In which directory is this file ? > > Le 25/07/2017 à 13:57, Maxim Solodovnik a écrit : > > is there

Re: REST API for OM

2017-07-25 Thread Jacob Ouanounou
In which directory is this file ? Le 25/07/2017 à 13:57, Maxim Solodovnik a écrit : is there anything suspicious in openmeetings.log file? On Tue, Jul 25, 2017 at 6:54 PM, Jacob Ouanounou > wrote: When I enter this directly on the browser, using

Re: REST API for OM

2017-07-25 Thread Maxim Solodovnik
is there anything suspicious in openmeetings.log file? On Tue, Jul 25, 2017 at 6:54 PM, Jacob Ouanounou wrote: > When I enter this directly on the browser, using the correct user and pwd, > I get this > > {"serviceResult":{"code":-1,"message":"Login failed","type":"ERROR"}} > >

Re: REST API for OM

2017-07-25 Thread Jacob Ouanounou
When I enter this directly on the browser, using the correct user and pwd, I get this {"serviceResult":{"code":-1,"message":"Login failed","type":"ERROR"}} Le 25/07/2017 à 13:47, Maxim Solodovnik a écrit : to login and get SID you can just type in your browser:

Re: REST API for OM

2017-07-25 Thread Maxim Solodovnik
to login and get SID you can just type in your browser: http://35.157.227.184:5080/openmeetings/services/user/login?user=XXX; pass=XXX Here is the link to PHP API (seems to work, just have tested with Moodle) https://github.com/openmeetings/openmeetings-api-plugin Here is the link to Java Unit

Re: REST API for OM

2017-07-25 Thread Jacob Ouanounou
Can you please send me your code, si that I could see a code that works and get inspired ... Le 25/07/2017 à 13:33, Maxim Solodovnik a écrit : just have tested on demo server, works as expected how are you using the service? On Tue, Jul 25, 2017 at 6:28 PM, Jacob Ouanounou

Re: REST API for OM

2017-07-25 Thread Jacob Ouanounou
In a script, java inserted these lines $.ajax({ method: "GET", url: "http://35.157.227.184:5080/openmeetings/services/user/login;, data: {user: 'XXX', pass: 'XXX'}, dataType: "json" }); Le 25/07/2017 à 13:33, Maxim Solodovnik a écrit : just have tested on demo server, works as

Re: REST API for OM

2017-07-25 Thread Maxim Solodovnik
just have tested on demo server, works as expected how are you using the service? On Tue, Jul 25, 2017 at 6:28 PM, Jacob Ouanounou wrote: > I have followed the first example, and I get this error : > (services/user/login) > > No 'Access-Control-Allow-Origin' header is present on

Re: REST API for OM

2017-07-25 Thread Jacob Ouanounou
I have followed the first example, and I get this error : (services/user/login) No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access. Le 25/07/2017 à 12:24, Maxim Solodovnik a écrit : Yes, API was changed please check

Re: REST API for OM

2017-07-25 Thread Maxim Solodovnik
Yes, API was changed please check the example I believe it is cleaner now :) On Tue, Jul 25, 2017 at 5:22 PM, Jacob Ouanounou wrote: > In a previous version, I started by using this link to do a session > request : > > http://:5080/openmeetings/services/UserService/getSession >

Re: REST API for OM

2017-07-25 Thread Jacob Ouanounou
In a previous version, I started by using this link to do a session request : http://:5080/openmeetings/services/UserService/getSession to initiate the connection process Now I get this answer :

Re: REST API for OM

2017-07-25 Thread Maxim Solodovnik
It is definitely possible :) Here is sample: http://openmeetings.apache.org/RestAPISample.html Here is the link to the API javadoc: http://openmeetings.apache.org/openmeetings-webservice/apidocs/index.html On Tue, Jul 25, 2017 at 4:57 PM, Jacob Ouanounou wrote: > Hi, > > It