Jump to content
Server Maintenance This Week. ×

Using Whatsapp within filemaker


This topic is 1660 days old. Please don't post here. Open a new topic instead.

Recommended Posts

 I want to create the option to send WhatsApp messages within fmp .
I found a site named whatsmate.net , that uses a rest service, they have php (https://whatsmate.github.io/2016-02-20-send-whatsapp-message-php/), c, java codes examples that works with their system, they use cURL which is now available in filemaker 16 and filemaer 15 has a plugin for that purposes. Any ideas?. 
 
Link to comment
Share on other sites

  • 4 weeks later...

As far as the situation was earlier in the summer, WhatsApp doesn't allow third party messaging. There has been some APIs etc over the years but WhatsApp has declined the access of those for security reasons.Telegram (another messaging app) allows third party messaging via bots. But you cannot send messages from yourself to someone else directly. 

Link to comment
Share on other sites

I see, so it´s not convenience to use Telegram because their system will be block, sooner or later ?

You think It´s possible for filemaker to send the message thru WhatsApp web , https://web.whatsapp.com/    ?

IF any way, if i decided to use Telegram, how to script it in fmp. i think i should use insert from url but don´t know exactly how to write it, the curl options to use etc.

 

Link to comment
Share on other sites

17 hours ago, jvagla said:

As far as the situation was earlier in the summer, WhatsApp doesn't allow third party messaging. There has been some APIs etc over the years but WhatsApp has declined the access of those for security reasons.Telegram (another messaging app) allows third party messaging via bots. But you cannot send messages from yourself to someone else directly. 

Ehhh, there is bot API and Telegram API: https://core.telegram.org/api what you really want is to make your own Telegram Messenger client inside FileMaker from what I read. I believe more than 90% of the knowledge you will need to apply was covered in Steve Winter's curl presentation at FM Dev Con 2017

Telegram Messenger is the snappiest IM I ever tried.

Edited by ggt667
  • Thanks 1
Link to comment
Share on other sites

Some background on two messaging apps:

I'm not 100% what I say is correct, but as far as I know Whatsapp use end-to-end encrypting on every message and discussion. Whatsapp web and whatsapp desktop app are relying on your phone to be in the same network (wifi etc) to access messages. Everything still goes through your phone.

Telegram does it differently. It's messages are not (AFAIK) e2e encrypted by default. You can message without your phone on desktop app or web app. If you enable e2e encryption on discussion you will be able to access the messages only in that device.

Apis:

Telegram has Telegram Api and Bot Api, like @ggt667 told above. Telegram api is more complicated because you have to create your own client. That might be possible inside FileMaker as well. It should work like the standard Telegram app.

The Bot Api is created for delivering messages to Telegram users. You can send messages to the bot. Then you subscribe the bot (or add the bot to your contacts) to see messages. For example, if you want to send Telegram messages from FileMaker to someone, that someone needs to have the bot in his/her telegram contacts. People can also "talk" with the bot by sending some commands to them. Read more from https://core.telegram.org/bots

Link to comment
Share on other sites

Whatsapp's e2e is not necessarily better than HTTPS from what I understand; while Telegram's e2e is.

Edited by ggt667
Link to comment
Share on other sites

16 hours ago, [email protected] said:

I see, so it´s not convenience to use Telegram because their system will be block, sooner or later ?

You think It´s possible for filemaker to send the message thru WhatsApp web , https://web.whatsapp.com/    ?

IF any way, if i decided to use Telegram, how to script it in fmp. i think i should use insert from url but don´t know exactly how to write it, the curl options to use etc.

 

Telegram's apis should work in the future as well. They have different intentions and use cases than Whatsapp that is purely a p2p messaging app.

What's your use case? Do you want sent messages as yourself or more like service messages to clients? Do you need to receive messages?

Link to comment
Share on other sites

If you choose Telegram Messenger; you most likely would like to implement: https://core.telegram.org/method/auth.signIn https://core.telegram.org/method/messages.sendMessage and their prerequisits. Before you start acquire an API ID: https://core.telegram.org/api/obtaining_api_id for your own client.

If you would like a 3rd option: this video( 02:30 - 35:58 ) may or may not suite your needs for messaging in a FileMaker setup alone:

 

Edited by ggt667
Link to comment
Share on other sites

If you go the telegram way I may be able to contribute. I have _NO_ desire to use Facebook/whatsapp or skype, however Telegram Messenger is really good.

Edited by ggt667
Link to comment
Share on other sites

Here is a short tutorial how to send Telegram message from FileMaker 16 (previous version needs to set target as field):

1. Find @BotFather from telegram
2. Send message: /newbot
    1. Answer to questions (Bot name, bot username)
    2. Get token (12345:AAFzdx1231sfasfddafskv_KBkARu5UdsdsfHM)
3. Find newly created bot and start conversation (/start)
4. Create a FileMaker script
    1. Set variable ($cmd; "getUpdates")
    2. Insert From Url
        1. With dialog: off
        2. Specify target as variable: $$response
        3. Specify URL: "httpspost://api.telegram.org/bot12345:AAFzdx1231sfasfddafskv_KBkARu5UdsdsfHM/" & $cmd
5. Run the script and look for the $$response variable on data viewer
6. Get "id" of your user (1234567)
7. Edit the script to have variables:
    1. $who; "1234567" (id of the user)
    2. $text; "Hello, this was sent from FileMaker"
    3. $cmd; "sendMessage?chat_id=" & $who & "&text=" & $text
8. Run the script again with new command and telegram message will be sent to you
 

  • Thanks 1
Link to comment
Share on other sites

  • 3 weeks later...
  • 10 months later...
On 8/19/2017 at 5:11 PM, jvagla said:

Here is a short tutorial how to send Telegram message from FileMaker 16 (previous version needs to set target as field):

1. Find @BotFather from telegram
2. Send message: /newbot
    1. Answer to questions (Bot name, bot username)
    2. Get token (12345:AAFzdx1231sfasfddafskv_KBkARu5UdsdsfHM)
3. Find newly created bot and start conversation (/start)
4. Create a FileMaker script
    1. Set variable ($cmd; "getUpdates")
    2. Insert From Url
        1. With dialog: off
        2. Specify target as variable: $$response
        3. Specify URL: "httpspost://api.telegram.org/bot12345:AAFzdx1231sfasfddafskv_KBkARu5UdsdsfHM/" & $cmd
5. Run the script and look for the $$response variable on data viewer
6. Get "id" of your user (1234567)
7. Edit the script to have variables:
    1. $who; "1234567" (id of the user)
    2. $text; "Hello, this was sent from FileMaker"
    3. $cmd; "sendMessage?chat_id=" & $who & "&text=" & $text
8. Run the script again with new command and telegram message will be sent to you
 

Thanks so much for the Tutorial you provided. I'm new to this and have managed to get part of this working.

My challange at this point is that I'm not getting an ID in the response variable. Below is the exact response that I receive:

{"ok":true,"result":[]}

If I change anything in the URL I receive an error message so it seems something is working correctly, only, I'm not getting the ID.

have I missed something?

Link to comment
Share on other sites

  • 1 year later...
  • Newbies

This looks like an excellent technique but I can't seem to get it to work. I'm using FMP18. I have followed the instructions above but the response I get is;

<html>
<head><title>302 Found</title></head>
<body bgcolor="white">
<center><h1>302 Moved Temporarily</h1></center>
<hr><center>Umbrella Cloud Security Gateway</center>
</body>
</html>

Is there something wrong with my Bot?! Apologies for my lack of expertise and thanks in anticipation for your help.

Link to comment
Share on other sites

This topic is 1660 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.