API Mate post request via proxy

79 views
Skip to first unread message

Wolfgang Pein

unread,
Nov 8, 2020, 7:09:28 AM11/8/20
to BigBlueButton-dev
Hi all,
API Mate is great and I use it a lot to test the various API parameters.
Now I want to test "pre-upload for create" parameter (upload pdf when creating a meeting).
API Mate says: " one or more URLs, one per line, only works via POST ". So I used POST rather than GET but get result: "server responded with status 0 - no content".

OK, according to API Mate docu POST will only work if you allow cross-domain request.
So I implemented solution 2 (local proxy), the proxy works - but only with GET requests.
With POST request I still get the same error!

In the proxy log I can see that a API Mate POST create request does result in 2 entries: first: "request received: OPTIONS" followed by "Request received: POST".

Any ideas about this beviour? How can I get it to work?

Do I still have to change Bigbluebutton configuration to support CORS (Cross domain)?
This is solution 1 in the documentation!

For testing the proxy I am using a CentOS 7 virtual machine with firefox 82.0 !!

Thanks Wolfgang

Wolfgang Pein

unread,
Nov 8, 2020, 7:43:02 AM11/8/20
to BigBlueButton-dev
Additional Information:

I checked the communication with Wireshark.
It appears that the HTTP POST request is properly sent to the bigbluebutton server (via the proxy).
However the result sent by bigbluebutton server is HTTP error 301 (permanently moved).

Ahhh - the problem is http vs. https.
I edited the Mate API proxy config file. 

From ""host": "conference......." to "host": "https://conference......" i.e. you have to explicitly state https://....

But it still does not work. However I now receive error 500 (Internal Server Error)

Any ideas about this error???

Wolfgang Pein

unread,
Nov 8, 2020, 7:55:05 AM11/8/20
to BigBlueButton-dev
I think I was wrong with my last post!!
The above mentioned change to file .target.json does not work because obviously error 500 is sent by the proxy or API Mate.
I cannot see any communication in Wireshark when creating a POST request.

So my conclusion would be: I have to adress the target server in .target.json as https target - but how???

Wolfgang Pein

unread,
Nov 8, 2020, 12:35:01 PM11/8/20
to BigBlueButton-dev
Hi all,
sorry for all my messages. I finally was successful to use API Mate with POST request.

There is a way to use POST requests without to change bigbluebutton nginx configuration for cross domain nor did I use the API Mate proxy.
However I followed a very interesting link ("Run the Chrome Browser without CORS"):  https://alfilatov.com/posts/run-chrome-without-cors/

I tested it with Windows 10 and it works! 

The behaviour of API Mate has changed with this Chrome version: in the API Mate browser screen I could only see the POST button (no GET) and when executing a POST request e.g. for create
(including a link for pre load of PDF file) API Mate does respond with a dedicated message screen (response)!! In my case the meeting was created and the PDF was uploaded .

Regards
Wolfgang

Wolfgang Pein

unread,
Nov 8, 2020, 3:04:54 PM11/8/20
to BigBlueButton-dev
One more comment: this only works with the following API Mate link:  http://jfederico.github.io/api-mate/
Is this a fork of the "regular" API Mate at https://mconf.github.io/api-mate/ ???

Reply all
Reply to author
Forward
0 new messages