adamvduke / mod_interact

A module to forward certain ejabberd notifications to an arbitrary url
89 stars 30 forks source link

What value do i need to pass in place of auth_token #21

Closed pawan-saxena closed 6 years ago

pawan-saxena commented 6 years ago

Hello I am new to erlang and ejabberd, so apologies if question seem silly. I am using a third party service which gave a URL : http://abc.com/send_push and i need to do a post at this url with some params, to send push.

Now sometimes i need to send a stanza to ejabberd (to meet some specific requirements)

$data = [
            'stanza' => "<message type='chat'><body>" . $message . "</body><type>chat</type><message_format>
             <fromDid>" . $from . "</fromDid>
             <from>" . $from . "</from>
             <messageTime>" . time()*1000 . "</messageTime>
             <messageId>" . time() . "</messageId>
             </message_format></message>",
             'from' => $from,
             'to' => $tom
          ]

When i send this stanza from my backend to ejabberd i use the rest api of ejabberd : mod_http_api to receive it. Now i don't have any auth_token which value should i pass into that field if i use mod_post_offline