ejabberd-api

Ejabberd - Run SQL Query for Custom Command

心已入冬 提交于 2020-05-16 03:13:28
问题 I'm trying to make a custom command in mod_admin_extra.erl . to fetch messages between 2 JIDs. My command will look like this:- ejabberdctl get_messages HOST FROM TO START_TIME END_TIME The SQL query will be like:- select * from archive where (username = FROM and bare_peer = TO) OR (username=TO and bare_peer = FROM) where created_at BETWEEN START_TIME AND END_TIME; I went through this thread to understand how IQ query works and want to build a similar sort of a thing via the command and API.

ejabberd - Fetch the history messages mod_mam via API

时光总嘲笑我的痴心妄想 提交于 2020-04-30 08:46:23
问题 I've activated mod_mam module in Ejabberd as follow:- mod_mam: db_type: sql assume_mam_usage: true default: always clear_archive_on_room_destroy: false How do I fetch messages over the APIs? 回答1: If "over the APIs" means using mod_http_api, xmlrpc, ReST, or similar, then that isn't possible. mod_mam right now is to be used by XMPP clients as defined in https://xmpp.org/extensions/xep-0313.html 来源: https://stackoverflow.com/questions/61297053/ejabberd-fetch-the-history-messages-mod-mam-via-api

ejabberd - Fetch the history messages mod_mam via API

馋奶兔 提交于 2020-04-30 08:46:12
问题 I've activated mod_mam module in Ejabberd as follow:- mod_mam: db_type: sql assume_mam_usage: true default: always clear_archive_on_room_destroy: false How do I fetch messages over the APIs? 回答1: If "over the APIs" means using mod_http_api, xmlrpc, ReST, or similar, then that isn't possible. mod_mam right now is to be used by XMPP clients as defined in https://xmpp.org/extensions/xep-0313.html 来源: https://stackoverflow.com/questions/61297053/ejabberd-fetch-the-history-messages-mod-mam-via-api

Host not served (ejabberd)

假如想象 提交于 2020-01-24 01:46:06
问题 I'm using out of the box ejabberd/ecs - Docker Hub and I've tried to run curl command (from my own container) to register the user , yet got following message: Host not served actual curl command w/ output: /app # curl -ks --request POST https://ejabberd:5443/api/register --data '{"user":"test","host":"localhost","password":"testing"}' Host not served /app # As far as Docker goes, both my app and ejabberd containers are both in same network. Please advise. ejabberd.yml just in case. 回答1: I

400 bad request error while calling ejabberd api

守給你的承諾、 提交于 2019-12-25 12:54:39
问题 I am getting 400 bad request error while calling "/api/get_roster" endpoint of ejabberd. I had kept "get_roster" in the scope while requesting the oauth token. 400 bad request error in ejabberd I guess there is some issue with the permissions. Here is my configuration file: https://www.dropbox.com/s/his89bx39qhvr1h/ejabberd2.yml?dl=0 I have tried to follow the official documentation. As per the API permission guide, I have also tried adding following properties: api_permissions: - "Admin

what does feature not implemented response mean

时间秒杀一切 提交于 2019-12-25 01:45:52
问题 I am trying to send a custom IQ to ejabberd server from android app and I have this following class public class IQCustom extends IQ { public final static String childElementName = "query"; public final static String childElementNamespace = "jabber:iq:conversations"; public IQCustom(String userFrom, String server) { super( childElementName, childElementNamespace ); this.setType(Type.get); setTo( server ); setFrom( userFrom ); } @Override protected IQChildElementXmlStringBuilder

Ejabberd trying to subscribe a user through api

萝らか妹 提交于 2019-12-13 04:01:18
问题 I am trying to subscribe a test user to a test room using the Ejabberd API. I am sure I just misconfigured something but I can't seem to find the issue. I am running Ejabberd 16.09 and trying to use mod_http_api My configuration is the following: hosts: - "localhost" - "my.personal.host" listen: - port: 5285 module: ejabberd_http request_handlers: "/api": mod_http_api acl: admin: user: - "@localhost" modules: mod_muc: mam: true default_room_options: allow_subscription: true access: - allow

Accessing ejabberd ReST API through node js app

泪湿孤枕 提交于 2019-12-11 04:47:57
问题 I have an ejabberd (16.01) server running on Ubuntu 16.04. I have another NodeJs application running on different server. Through NodeJs application, I wish to add users, add rosters, etc by using ReST API given at https://docs.ejabberd.im/developer/ejabberd-api/. I am doing simple configuration given at https://docs.ejabberd.im/developer/ejabberd-api/simple-configuration/ for this exercise. The configuration says to add below snippet: commands_admin_access: - allow: - user: "admin@localhost"

ejabberd BOSH search brings nothing

一笑奈何 提交于 2019-12-02 21:59:54
问题 We're trying to switch from Openfire to ejabberd XMPP server. I have ejabberd installed with default options on my local Windows 10 workstation. I set mod_vcard: search: true I registered a couple of users using ejabberd ReST API. I also set some vcard values for those users (my understanding is that vcard entries are necessary for ejabberd search to work, correct?) Using Postman, I can confirm that there are vcards for user "testfouoles": POST http://localhost:5281/api/get_vcard Body: {

ejabberd BOSH search brings nothing

[亡魂溺海] 提交于 2019-12-02 12:49:50
We're trying to switch from Openfire to ejabberd XMPP server. I have ejabberd installed with default options on my local Windows 10 workstation. I set mod_vcard: search: true I registered a couple of users using ejabberd ReST API. I also set some vcard values for those users (my understanding is that vcard entries are necessary for ejabberd search to work, correct?) Using Postman, I can confirm that there are vcards for user "testfouoles": POST http://localhost:5281/api/get_vcard Body: { "host": "planetrisk.com", "user": "testfouoles", "name": "FN" } Response: { "content": "Test