WorkAdventure APIs

Choosing the right API for your project

WorkAdventure comes with 3 APIs:

  • The inbound API
  • The outbound API
  • The scripting API

Before trying to integrate your application with WorkAdventure, it is important to understand the scope of each API.

Inbound API

The inbound API a classic REST API. From your server, you can connect to WorkAdventure to create / edit / delete members in your world. There is also an existing Zapier plugin that is using the inbound API under the hood.

graph BT
    B --> C[("Database<br/><em>(members)</em>")]
    A[Your application] -->|Inbound API| B(WorkAdventure server)
    E[Zapier] -->|Inbound API| B
    F[Your other application] --> E

Sample use case: The inbound API is perfect if you want to integrate WorkAdventure with a ticketing system (for instance to create a new member with each ticket sold in your ticketing system).

View the inbound API documentation

Outbound API

With the outbound API, it is WorkAdventure that will initiate HTTP requests to your server.

graph TD
    A --> C[("Database<br/><em>(members /<br/>rooms)</em>")]
    B(WorkAdventure server) -->|Outbound API| A[Your application]

When someone tries to connect to WorkAdventure, WorkAdventure will ask your server:

  • to resolve the URL to the map
  • if the user is allowed to connect and what tags the user has

When you use the outbound API, WorkAdventure completely bypasses the WorkAdventure administration dashboard. It gives you the ability to develop your own administration dashboard.

The outbound API is extremely powerful because it allows you to store the rooms and members in your own database, without having a need to synchronize your database with WorkAdventure.

View the outbound API documentation

Scripting API

The scripting API is a client-side API. It is executed in the browser only and can be used to add dynamic behaviours on your maps.

graph RL
    subgraph Web browser
    D[Javascript script] -->|Scripting API| C[WorkAdventure map]
    end

View the scripting API documentation