Need to pass the method =“DELETE”?

Our Requirement : We have setup jitsi-meet and the data of users in the meeting is stored in the dynamodb table. We need to delete the data after the user leaves the meeting.

We have written an API to delete the data and got an endpoint URL(had authentication issues).So ,We changed it as a public URL [54. .121. :3000/api/v1/grantmoderatorsdel/bf40737e-a201-443e-97ff-a4a86e74fedc] using Docker and ECS which works well in Postman.

so I added the API in mydomain.conf file as below

Component “event_sync.dev.team. .co" “event_sync_component”
muc_component = "conference.dev.team.
.co”
api_prefix = “http://54. .121. :3000/api/v1/grantmoderatorsdel/bf40737e-a201-443e-97ff-a4a86e74fedc”

where can I pass the method =“DELETE”???

In mod_event_sync_component.lua , in function room_destroyed(event), I tried adding
async_http_request(‘http://54.***.121.158:3000/api/v1/grantmoderatorsdel/5904a00f-7ace-47dc-820a-6c8cfdfa0b01’, {
headers = http_headers;
method = “DELETE”;
body = ’ ’
})

You can probably ask here: GitHub - jitsi-contrib/prosody-plugins: Prosody plugins for Jitsi

This exact question has been asked multiple times (here and here (now deleted) and in PM by your colleague). This is also not the first time this has happen. Please don’t do that. It does not help you get answers faster.

1 Like

We will make sure this will not happen again. We understand . Sorry.

Try 1:
I used the mod_reservations.lua which uses method = “DELETE” in the code. Added in mydomain.cfg.lua(/etc/prosody/conf.d)

VirtualHost “dev.team.****.co”
modules_enabled = {
“reservations”;
}
reservations_api_prefix = “http://54.175.121.158:3000/api/v1/grantmoderatorsdel/ad75dea3-29d3-45cc-8254-6c2075a2552c

Try 2:
Added code in the mod_reservations.lua.

           -- local url = api_prefix..'/conference/'..conflict_id;
            local api_prefixtest = "http://54.179.121.158:3000/api/v1/grantmoderatorsdel/c1953bac-1253-4784-98b4-47c6bd14366a";
            local url =  api_prefixtest..'/conference/'..conflict_id;
            local http_options = {
                method = 'DELETE';
                headers = http_headers;
            }

prosody log
Nov 29 08:54:31 certmanager error SSL/TLS: Failed to load ‘/etc/prosody/certs/localhost.key’: Check that the permissions allow Prosody to read this file. (for localhost)
Nov 29 08:54:31 localhost:tls error Error creating context for c2s: error loading private key (Permission denied)H
Nov 29 08:54:31 certmanager error SSL/TLS: Failed to load ‘/etc/prosody/certs/localhost.key’: Previous error (see logs), or other system error. (for localhost)
Nov 29 08:54:31 localhost:tls error Error creating contexts for s2sout: error loading private key (system lib)
Nov 29 08:54:31 certmanager error SSL/TLS: Failed to load ‘/etc/prosody/certs/localhost.key’: Previous error (see logs), or other system error. (for localhost)

Please let me how to resolve the above error and make my API url work.
I tried to Uncomment http_ports in /etc/prosody/conf.avail…but no luck.

Thanks

The error message is not related in the API call. It’s a seperate issue

But if I change the url to https I didn’t get the error

Can you suggest any ways to make our endpoint url work from prosody function.It is working fine in postman.

Thank you for the response.

I don’t think your Jitsi setup works correctly. Can you create a meeting with 3 participants in your server?