{"id":22794665,"url":"https://github.com/mconf/api-mate","last_synced_at":"2025-04-18T23:42:58.681Z","repository":{"id":9500878,"uuid":"11393980","full_name":"mconf/api-mate","owner":"mconf","description":"A tool to access the API of BigBlueButton and Mconf","archived":false,"fork":false,"pushed_at":"2023-02-04T18:47:02.000Z","size":1066,"stargazers_count":41,"open_issues_count":8,"forks_count":57,"subscribers_count":23,"default_branch":"master","last_synced_at":"2025-03-29T06:42:24.740Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://mconf.github.io/api-mate","language":"CoffeeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mconf.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-07-13T20:50:21.000Z","updated_at":"2024-12-20T15:50:29.000Z","dependencies_parsed_at":"2023-02-18T18:46:16.891Z","dependency_job_id":null,"html_url":"https://github.com/mconf/api-mate","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mconf%2Fapi-mate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mconf%2Fapi-mate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mconf%2Fapi-mate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mconf%2Fapi-mate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mconf","download_url":"https://codeload.github.com/mconf/api-mate/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249565262,"owners_count":21292427,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-12T04:09:44.128Z","updated_at":"2025-04-18T23:42:58.651Z","avatar_url":"https://github.com/mconf.png","language":"CoffeeScript","funding_links":[],"categories":["Tools"],"sub_categories":["Video Management"],"readme":"API Mate\n========\n\nAPI Mate is a web application (a simple web page) to access the APIs of [BigBlueButton](http://bigbluebutton.org) and [Mconf](http://mconf.org).\n\nUsage\n-----\n\n* Use it online at http://mconf.github.io/api-mate; or\n* Get the latest version from the branch [`gh-pages`](https://github.com/mconf/api-mate/tree/gh-pages) and\n  open `index.html` in your browser.\n\n\n## Passing parameters in the URL\n\nThe API Mate HTML page accepts parameters in the URL to pre-configure all the inputs available in the\nmenu, that will define the links generated. You can, for instance, generate a link in your application\nto redirect to the API Mate and automatically fill the server and the shared secret fields in the\nAPI Mate so that it points to the server you want to use.\n\nThe URL below shows a few of the parameters that can be passed in the URL:\n\n```\napi_mate.html#server=http://my-server.com/bigbluebutton/api\u0026sharedSecret=lsk8df74e400365b55e0987\u0026meetingID=meeting-1234567\u0026custom-calls=getMyData\n```\n\nThe parameters should be passed in the hash part of the URL, so they are not submitted to the server.\nThis means the application at http://mconf.github.io/api-mate will not receive your server's URL\nand shared secret. You can also pass these parameters in the search string part of the URL, but that means the server will have access to your parameters (might be useful if\nyou're hosting your own API Mate).\n\nThe server address and shared secret are defined in the URL parameters `server` and `sharedSecret`\n(you can also use `salt`), respectively.\n\nAll the other parameters are matched by an HTML `data-api-mate-param` attribute that is defined\nin all inputs in the API Mate. The input to define the meeting ID, for example, has this attribute\nset as `data-api-mate-param='meetingID,recordindID'`, so you can use both `meetingID=something` or\n`recordingID=something` in the URL and it will automatically fill the meeting ID input. The input\nto define custom API calls has the attribute set as `data-api-mate-param='custom-calls'`, and this\nis why in the URL above we used `custom-calls=getMyData`.\n\n\n## Allow cross-domain requests\n\nThe API Mate runs on your web browser and most of the API methods are accesssed through HTTP GET\ncalls, so you can simply click on a link in the API Mate and you'll access the API method.\n\nHowever, for some other methods (such as API methods accessed via POST) or some more advanced\nfeatures, we need to run API calls from the javascript using ajax. This will result in a cross-domain\nrequest, since a web page (the API Mate) is making requests directly to another server (your web\nconference server). Since cross-domain requests are by default disabled in the browser, they will\nall fail.\n\nWe offer two solutions:\n\n1. Change your BigBlueButton/Mconf-Live server to accept cross-domain requests (ok, but only\n   recommended for development and testing); or\n2. Use a local proxy that will receive the calls and proxy them to your web conference server.\n\n### 1. Change your server to accept cross-domain requests\n\nWith this option you will enable cross-origin requests using\n[CORS](http://en.wikipedia.org/wiki/Cross-origin_resource_sharing) on your BigBlueButton/Mconf-Live server.\n\n#### In BigBlueButton/Mconf-Live with Nginx\n\nCopy to following block of code to the bottom of the file `/etc/bigbluebutton/nginx/web.nginx`, inside the\nblock `location /bigbluebutton`:\n\n```\nlocation /bigbluebutton {\n    ...\n\n    # add this block!\n    if ($http_origin) {\n        add_header Access-Control-Allow-Origin *;\n        add_header Access-Control-Allow-Methods \"GET,POST,OPTIONS\";\n        add_header Access-Control-Allow-Headers  Content-Type;\n        add_header Access-Control-Max-Age        86400;\n    }\n}\n```\n\nNotice that it will allow cross-domain requests from **any** host, which is not recommended! Use it only\nfor test and development.\n\nSave it and restart Nginx to apply the changes:\n\n```bash\n$ sudo /etc/init.d/nginx restart\n```\n\nIf you need a more detailed and controlled example, [try this one](http://enable-cors.org/server_nginx.html).\n\n#### On [Node.js](http://nodejs.org/) with [Express.js](http://expressjs.com/):\n\nIf you're not accessing your web conference server directly, but through an application written in\nNode.js, you can use the following code to enable cross-domain requests:\n\n```coffeescript\napp.all '*', (req, res, next) -\u003e\n  res.header(\"Access-Control-Allow-Origin\", \"*\")\n  res.header(\"Access-Control-Allow-Headers\", \"X-Requested-With, Content-Type\")\n  next()\n```\n\n[Source](http://enable-cors.org/server_expressjs.html).\n\n\n### 2. Use a local proxy\n\nThere's an application that can be used as a local proxy called `api-mate-proxy` available in this\nrepository, in the folder [proxy](https://github.com/mconf/api-mate/tree/master/proxy).\n\nIt is a very simple Node.js application that you can run locally to receive all requests\nfrom the API Mate and proxy them to your web conference server.\n\n#### Usage\n\nSee `api-mate-proxy`'s [README file](https://github.com/mconf/api-mate/tree/master/proxy).\n\n\nDevelopment\n-----------\n\nAt first, install [Node.js](http://nodejs.org/) (see `package.json` for the specific version required).\n\nInstall the dependencies with:\n\n    npm install\n\nThen compile the source files with:\n\n    [./node_modules/.bin/]cake build\n\nThis will compile all files inside `src/` to formats that can be opened in the browser and place them into `/lib`.\n\nTo watch for changes and compile the files automatically, run:\n\n    [./node_modules/.bin/]cake watch\n\n\nLicense\n-------\n\nDistributed under The MIT License (MIT), see `LICENSE`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmconf%2Fapi-mate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmconf%2Fapi-mate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmconf%2Fapi-mate/lists"}