0% found this document useful (0 votes)
20 views1 page

Webhooks - WorkAdventure Documentation

The document provides a guide on setting up webhooks in WorkAdventure, detailing how to configure the webhook settings and the structure of the webhook payload. Currently, the only supported action is the authentication event, which allows for additional checks before granting room access. It also includes debugging tips for monitoring webhook requests through the admin dashboard logs.

Uploaded by

raziq.brown
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views1 page

Webhooks - WorkAdventure Documentation

The document provides a guide on setting up webhooks in WorkAdventure, detailing how to configure the webhook settings and the structure of the webhook payload. Currently, the only supported action is the authentication event, which allows for additional checks before granting room access. It also includes debugging tips for monitoring webhook requests through the admin dashboard logs.

Uploaded by

raziq.brown
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Map Building Admin User Developer Tutorials Login Get Started Search ctrl K

Api Reference

Camera Webhooks
Setting up a Webhook

Chat Webhook Payload

Controls Webhooks Webhook actions

Sample usage
Event
Debugging Webhooks
Map Editor API The webhook API provides a straightforward method for sending requests to a remote server each time some interactions happen in
WorkAdventure.
Metadata

Navigation

Player

Players

Room

Sound

Start INFO

State As of now, the only supported action is the authentication event.

UI

Deprecated Functions
Setting up a Webhook
Extended utility functions
To set up a webhook, you need to go to the Developers > Webhook settings page of the admin dashboard and provide the URL of the
Tiled Layers
endpoint that will receive the webhook requests.
Tiled Properties

Svelte

Variables

Scripting Internals

Using Typescript

Map Storage API

Room API

Webhooks

Webhook Payload
When the webhook is triggered, it sends a POST request with a JSON body containing four parameters:

action: The action that triggered the webhook (so far, it will always return auth )
roomUrl: Represents the URL of the room.
uuid: Represents the unique identifier of the member.
accessToken: The OAuth2 access token of your user (if you did set up the OAuth2 authentication).

Your webhook will be invoked using a curl command similar to the following:

curl --location 'your_webhook_url' \


--header 'Content-Type: application/json' \
--data-raw '{
"roomUrl": "room_url",
"uuid": "39afd085-c606-4a3e-b68e-d1d7ebeff82b",
"accessToken": "your_access_token"
"action": "auth"
}'

Webhook actions
As of now, the only supported action is the authentication event ( auth ). This event is triggered each time WorkAdventure performs a
security check to see if a user is allowed to access a room.

Sample usage
The auth event can be used to alter the behavior of the authentication process. The hook is triggered before the authentication is
performed, so when you receive the authentication event, you can perform additional checks on your server and alter the member's
tags in WorkAdventure using the Inbound API.

Let's imagine that you want to allow access to a meeting room based on a calendar in your database. When a user tries to access the
room, WorkAdventure will send a auth event to your server. You can then check if the user has a meeting scheduled at the time of the
request. If yes, you can add a "meeting" tag to the user using the Inbound API (that will grant access to the room) and if not, you can
remove the "meeting" tag (that will deny access to the room).

Debugging Webhooks
If you are not receiving the webhook requests, you can check the logs in the admin dashboard to see if there are any errors.

The logs are available in the Developers > Webhook settings page of the admin dashboard.

INFO

Need help 🆘

Contact us or write us to [email protected]

Edit this page

Previous
« Room API

Docs Need help ? Follow us

Map Building Book a demo Linkedin

Admin Discord Twitter


Developer GitHub Facebook

Copyright © 2024 workadventu.re - All Rights Reserved

You might also like