PHPackages                             inigo-aldama/inmovilla-api-proxy - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. inigo-aldama/inmovilla-api-proxy

ActiveProject[API Development](/categories/api)

inigo-aldama/inmovilla-api-proxy
================================

A proxy server for interacting with the Inmovilla API, designed for environments with restricted IP access.

v1.0.1(1y ago)0411MITPHPPHP ^7.4 || ^8.0

Since Dec 19Pushed 1y ago1 watchersCompare

[ Source](https://github.com/inigo-aldama/inmovilla-api-proxy)[ Packagist](https://packagist.org/packages/inigo-aldama/inmovilla-api-proxy)[ Docs](https://github.com/inigo-aldama/inmovilla-api-proxy)[ RSS](/packages/inigo-aldama-inmovilla-api-proxy/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (4)Versions (3)Used By (1)

Inmovilla API Proxy (Unofficial)
================================

[](#inmovilla-api-proxy-unofficial)

![Latest Version](https://camo.githubusercontent.com/4f7e0d0b2eb3de8c977c19f21c7250bee9dcbaef07d742736035565ed3a1f2e6/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f76657273696f6e2d312e302e302d626c7565)![PHP](https://camo.githubusercontent.com/39f74b306b25933f9e9dd63e6d2403f80b6496881143a3fcf48583a7e45f854b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253545372e34253230253743253743253230253545382e302d626c7565)[![License](https://camo.githubusercontent.com/f8df3091bbe1149f398a5369b2c39e896766f9f6efba3477c63e9b4aa940ef14/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d677265656e)](LICENSE)

`inmovilla-api-proxy` is a tool designed to solve a specific problem when interacting with the Inmovilla API: **IP-based access restrictions**.

> **Note:** This project is not affiliated with, endorsed by, or maintained by Inmovilla.

Why Use Inmovilla API Proxy?
----------------------------

[](#why-use-inmovilla-api-proxy)

Inmovilla restricts access to their API to specific IP addresses. This becomes a problem when you're developing from a machine outside the allowed IP range. Here's how the situation looks:

- **Production server with `inmovilla-api-client` installed**
    ✅ Can connect to the Inmovilla API (IP is allowed).
- **Development machine with `inmovilla-api-client` installed**
    ❌ Cannot connect to the Inmovilla API (IP is not allowed).

This package solves the issue by enabling the production server to act as a proxy. With `inmovilla-api-proxy` installed on the production server:

1. Your development machine sends requests to the **production server** (acting as the proxy).
2. The production server forwards these requests to the Inmovilla API.
3. The response from the Inmovilla API is sent back to your development machine.

---

How It Works
------------

[](#how-it-works)

Here’s a visual representation of the interaction flow between the Development Server, Production Server, and the Inmovilla API:

[![UML Diagram](https://camo.githubusercontent.com/97483918e7bfb78585576cfdbfd098dddcfe96a1552c900fc45bc1d2e4d5219c/68747470733a2f2f7777772e706c616e74756d6c2e636f6d2f706c616e74756d6c2f706e672f544f2d6e4a6944303334337456384e4c32474a765747776538384a653561353735596c646d544235545f5953354675554c77544b4834644e79746c466c61436e4c316b377331585239335941614d396c643048556f437634306779714b4b6e7638333775393972383777374a35435141704b79656d564b584a486d5a6d644474523968695255757665766b78545550427864574d4d6970537a66357a55687933424531756650514c7255394c39366c772d4f4b376b39732d44425251592d696c504674357a483965645f77765574575f644a687565452d48595a4e706536386b786b346a774861724b4258325f57706a54674e6139384b4d3647547a7a7050743830645a34467930)](https://camo.githubusercontent.com/97483918e7bfb78585576cfdbfd098dddcfe96a1552c900fc45bc1d2e4d5219c/68747470733a2f2f7777772e706c616e74756d6c2e636f6d2f706c616e74756d6c2f706e672f544f2d6e4a6944303334337456384e4c32474a765747776538384a653561353735596c646d544235545f5953354675554c77544b4834644e79746c466c61436e4c316b377331585239335941614d396c643048556f437634306779714b4b6e7638333775393972383777374a35435141704b79656d564b584a486d5a6d644474523968695255757665766b78545550427864574d4d6970537a66357a55687933424531756650514c7255394c39366c772d4f4b376b39732d44425251592d696c504674357a483965645f77765574575f644a687565452d48595a4e706536386b786b346a774861724b4258325f57706a54674e6139384b4d3647547a7a7050743830645a34467930)

### Production Server

[](#production-server)

- **`inmovilla-api-client`** is installed to send API requests to Inmovilla.
- **`inmovilla-api-proxy`** is installed to act as a proxy for requests from the development machine.

### Development Machine

[](#development-machine)

- **`inmovilla-api-client`** is installed to send requests to the proxy on the production server.

### Example Flow

[](#example-flow)

1. **Without Proxy**

    - Development server → Direct connection to Inmovilla API → ❌ IP not allowed.
2. **With Proxy**

    - Development server → Proxy on production server → Inmovilla API → ✅ Works.

---

Requirements
------------

[](#requirements)

- **PHP**: 7.4 or higher.
- **Composer**: For dependency management.
- Libraries:
    - [`inigo-aldama/inmovilla-api-client`](https://packagist.org/packages/inigo-aldama/inmovilla-api-client)

---

Installation
------------

[](#installation)

1. **Install the Proxy on the Production Server**Clone the repository or use Composer:

    ```
    composer require inigo-aldama/inmovilla-api-proxy
    ```
2. **Configure API Credentials**Update the `api.ini` configuration file on both servers (development and production):

    **`api.ini` on the production server:**

    ```
    api_url = "https://api.inmovilla.com/v1"
    domain = "production-domain.com"
    agency = "production-agency"
    password = "production-password"
    language = 1
    ```

    **`api.ini` on the development server:**

    ```
    api_url = "http://production-server-url/api-proxy"
    domain = "production-domain.com"
    agency = "development-agency"
    password = "development-password"
    language = 1
    ```

---

Usage
-----

[](#usage)

1. **On the Production Server**Deploy `inmovilla-api-proxy` with the following setup:

    ```
