Doubt: consume external REST APIs from Mozilla Hubs. #3293
-
Hello, I would like to ask you a question I have. I would like to know if it is possible to consume external REST APIs from Mozilla Hubs. For example, a use case could be to consume an external loyalty API REST from Mozilla Hubs, so that a user could know the points he has accumulated. Is this possible? Thank you in advance! Best, |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
This is possible using your own Hubs Cloud instance. It isn't able to be done on hubs.mozilla.com because we manage the CORS + CSP rules. On your own HC, you'll modify those to approve that API endpoint url so you can make those requests. |
Beta Was this translation helpful? Give feedback.
-
Thank you very much for your response! Would it be possible to find out what the procedure would be for carrying out this task of consuming an external API from my own HW instance? I suppose it would be possible by creating and deploying a custom client, as indicated in the documentation: https://hubs.mozilla.com/docs/hubs-cloud-custom-clients.html But my question is: what would be the first step? Is there specific documentation on how to expand the client to perform a task such as the consumption of an external API? Any good practices? Thank you very much in advance. |
Beta Was this translation helpful? Give feedback.
This is possible using your own Hubs Cloud instance.
It isn't able to be done on hubs.mozilla.com because we manage the CORS + CSP rules. On your own HC, you'll modify those to approve that API endpoint url so you can make those requests.