Skip to main content

Integration Guide

This guide explains how to integrate the Room 1 backend with various VR frontends and external systems.

Integrating with VR Frontends

Unity Integration

Room 1 can be easily integrated with Unity-based VR applications using REST API calls.

Setup Steps

  1. Add the following script to your Unity project:
  1. Attach the Room1APIClient script to a GameObject in your scene
  2. Configure the baseUrl and apiKey in the Inspector

Example Usage

Unreal Engine Integration

For Unreal Engine integration, you can use the HTTP module to communicate with the Room 1 backend.

Integrating with External Systems

Web Applications

You can integrate Room 1 with web applications by making direct API calls:

Mobile Applications

For React Native applications:

Security Considerations

When integrating Room 1 with external systems, consider these security best practices:
  1. API Key Management:
    • Never hardcode API keys in client-side code
    • Use environment variables or secure storage
    • Rotate API keys periodically
  2. Cross-Origin Resource Sharing (CORS):
    • Configure CORS on the backend to restrict access to authorized domains
  3. Input Validation:
    • Validate all input on both client and server sides
    • Sanitize file paths to prevent directory traversal attacks
  4. Error Handling:
    • Implement proper error handling to prevent information disclosure
    • Log errors securely for debugging

Troubleshooting Integration Issues

Common Problems

  1. Connection Refused:
    • Ensure the Room 1 backend is running
    • Check network connectivity and firewall settings
  2. Authentication Errors:
    • Verify API key is correct and properly formatted in headers
    • Check API key has not expired or been revoked
  3. Missing Resources:
    • Confirm file paths exist on the server
    • Verify storage directory configuration is correct
  4. Performance Issues:
    • Implement caching for frequently accessed resources
    • Use thumbnail previews rather than full images when appropriate