API Whatsapp to send messages from an external application - api

I want to implement Whatsapp
to send information from an external application. The idea is to use this
external application to send information throughout Whatsapp.
If you can help me about the terms and
conditions and if this query is possible to develop.

There is a way through which you can send WhatsApp message from your self created application. Use this link Chat API.
But it only provides 3 days trail period and after that you have to purchase it.
The process in that is, you have to register with your google account, then scan the QR code provided(which changes after every 45 seconds). and you are set to go, they will provide you the API for : PHP, Node.JS, Jquery, CURL.
One thing more you always have to keep your phone connected with the internet everytime.
Also I found a drawback in that, i.e. they also provide API to read messages, but it is too slow, as in my condition I can see my messages of yesterday but not of today.

Related

How would I go about developing a program that automatically sends an email with the tracking number to a customer using EasyPost API?

I'm a fairly new web developer and I have an ecommerce website that integrates EasyPost to create and print shipping labels.
EasyPost has an API. Also, in each shipping label, I see a JavaScript object (I think) that displays buyer_address... "email": "example#gmail.com",, which tells me that the email information is there.
My question is somewhat general in scope: What steps would I need to take to go about creating this automation? The website is built in Webflow, so I don't really have a "codebase" or "repository" to store whatever code is needed to build the automation.
Since the buyer email is making it into EasyPost with integrations already in place, I feel that I could create a simple program that emails the tracking number to the buyer email every time a label is generated, or perhaps when package is shipped, without the program needing to interact with Webflow or other integrations.
I attempted using Zapier, as well as Make.com. Neither worked, and OrderDesk doesn't have a way to send tracking number emails.
It looks like Webflow has some kind of support for Webhooks (https://webflow.com/feature/create-webhooks-from-project-settings). EasyPost offers webhooks for free as an add-on service. Basically, with webhooks, EasyPost would send tracking events to Webflow proactively, but Webflow (or you) would need to manage the logic for what to do with those tracking events after they are delivered.
EasyPost Webhook Guide
I'm unaware of any off the shelf products that could do this for you without writing any code. We have a guide that details how you might accomplish this with Ruby (you could then follow this as an example for any other language): https://www.easypost.com/email-tracking-tutorial
A few suggestions:
Integrate something into Webflow if possible (I'm unfamiliar with the platform so couldn't say).
Build a simple script that runs on a schedule (cronjob) that retrieves your trackers from EasyPost and sends an email to customers if they have not yet received one. To your point, this approach wouldn't require interacting with Webflow at all and could be done with some local code running on a server and just your EasyPost API key.
I've created a simple UI for EasyPost: https://github.com/Justintime50/easypost-tools-ui, it could be interesting to add this particular use-case as a feature to that project. If you're interested, feel free to open an issue on GitHub for the repo listed here and I'd consider it.
You'd use easypost's API webhooks, to detect when shipment tracking information is provided, or package information is updated.
https://www.easypost.com/docs/api#trackers
It looks like it has a lot of states, so you can keep the client updated regarding the package status from the moment the tracking # is assigned;
EZ1000000001 pre_transit
EZ2000000002 in_transit
EZ3000000003 out_for_delivery
EZ4000000004 delivered
EZ5000000005 return_to_sender
EZ6000000006 failure
EZ7000000007 unknown
You can install webhooks from these docs.
To send the email, you can use an automation service e.g. Make to capture those webhook events, and then compose and send an email to that customer. I like MailJet for that purpose, because it has excellent template support and you can send from your own company domain. But there are many email-sending options.
A bigger challenge, maybe, is getting the email address to send to. I didn't spot it glancing through the Trackers or Shipments data structures, and I am primarily seeing physical address info.
If EasyPost is not tracking the customer's email with the shipment, you may have some challenge in that you'd need to capture the client info through Webflow's order webhooks, and then associate that with EasyPost's shipmentid, and store those in a reference table.
Many automation services offer database-like functionality for this purpose, or you could use e.g. google sheets ( columns webflow OrderID, easypost ShipmentID, customer Email ) or airtable for that purpose.
But you'd have to look into the Easypost integration as well, and you may need to make that integration manual so that you can acquire all 3 of those pieces of information at the same point in your business data flow.

Getting started creating a web form in Microsoft Teams

I dont know where to begin. Do I need to create an app? Do I need to use bots? I have tried finding docs online but don't know where to start. Any help with be appreciated.
I am trying to create a small form in a teams channel that my users will fill out.
User enters #projects
Web server responds with
User clicks submit and data gets posted to my web server.
You're correct that there are a few different kinds of applications in Teams, so finding the one that suits your needs can be a little confusing at first. For what you're trying to do, I would recommend a Bot, and when it received a message (which it will do when it receives your #mention), it can respond with an Adaptive Cards. Adaptive Cards, if you've not used them, are like small embedded forms inside the chat. The user can complete the card and click a button, and it will send the payload back to your bot to do whatever it needs.
Bots, incidentally, are basically just web services, so your bot can do whatever it needs once it received the payload, such as calling another API in turn.
You haven't mentioned what language you might want to work in, but here are some good starting point nevertheless:
https://dev.botframework.com/
https://github.com/microsoft/BotBuilder-Samples/tree/main/samples
https://github.com/microsoft/BotBuilder-Samples/tree/main/samples/csharp_dotnetcore/57.teams-conversation-bot (I've linked the C# version - you should know that Teams bots use the same Microsoft framework as -all- bots build for the Microsoft world, such as web chat bot or a Skype bot. As a result, you have to ensure that anything you look at is applicable to Teams as some content/samples are not)
https://adaptivecards.io/ (as with Bots, Adaptive Cards have a life outside of Teams, so some articles/content/etc. might not be applicable to your scenario)

API architecture - what to include

I am building a RESTful api for a project at the moment, the API will used for a web application, a mobile application and maybe eventually a desktop application.
There are a few instances where emails need to be sent to notify the user of an event that has happened within the application. What I am not sure of is where to does a an APIs job finish, should the API be responsible for sending the emails, or should the application send the emails based on what response comes from the API?
Basically what I am asking is where does an APIs job start and finish, is an APIs job just getting date from point A to point B? Or can it deeper capabilities?
It's a common mistake that many developers are still making. An API is just an interface through which you expose your underlying system to be accessed by other systems. How you expose your system depends on what functionalities you want to be visible to the external world. Moreover, your business logic should be entirely on your backend rather than spread over your mobile/web applications.
Having said that, my answer is yes! Don't think of it as "my API is sending emails". Think of it as "my MAIN SYSTEM is sending emails". Whether you want to expose this email functionality through your API or not is another completely different thing.

Can you upload data to the Google Analytics API?

There are companies out there that claim to "integrate" data into GA. I know some phone call tracking companies in particular. Is there a way that they are uploading data to GA through the API or are they using some other method that doesn't require that?
There is no upload mechanism into Google Analytics besides manual __utm.gif calls like in the browser. Both Google Analytics APIs (Data Export and Management) are completely Read-Only.
There are a few ways these solutions work, but one of them is to generate a unique identifier for the person calling in to give the person on the other line. That code is linked to their referral information (grabbing from the cookies). Another solution is to have the customer manually input their phone number. That phone number is then dialed by the software and connected to the live person, and in the background the phone number is linked to the source information from the cookies.
Then, the person receiving the call either inputs the code it into the system, or automatically has the user's information, and at the completion of the call, depending on how it is resolved, can generate things like e-commerce transactions or particular pageviews for Goals, so it can generate __utm.gif calls with the relevant campaign and user data appended. As far as Google Analytics is concerned, the request formed is the same user. The only thing that will be different is the User Location (which is fairly inaccurate to begin with.)
ie, if I take the __utm.gif call from my computer, paste it to you, and you click it, Google will see that as an another pageview on this visit, and for most purposes ignore that the differing locations.
Well, Google Analytics works off the a tracking GIF with all kinds of data appended to it, so it can certainly be reproduced by these phone call tracking folks without a problem.
Phone call comes, request the 1x1.gif from google with tracking data suiting your needs, and the hit+data will soon register on GA.
http://www.google-analytics.com/__utm.gif?data-here&account=UA-blah&more-stuff
There are several options to send tracking data to Google analytics.
Use a library which implements the ga.js script server-side
When you use Google Analytics in the way described by Google, you include a script on your website. This script sends data from the visitors browser to the Google Analytics server.
This script has been reverse engineered and implemented in server-side libraries. Now you can send the same data from the server to the Google Analytics server. You can use PHP-GA for PHP or pyga for Python.
Use the Google Analytics measurement protocol
The Google Analytics measurement protocol is a new API to send data to Google Analytics. You can send data by sending POST requests to the API.

Testing SMS code without access to a texting plan

Is there any way to test SMS messaging without having a texting plan?
There isn't any way to setup the equivalent of a mock email server for the purposes of testing an SMS service is there? Are there any other ways to accomplish the task? Perhaps setting up something like a GrandCentral account that can receive text messages?
I am looking to test SMS messages to multiple accounts without having to find multiple people with texting plans and coordinating the effort.
Google now has the answer for which I seek. With the roll-out of their new Google Voice (previously GrandCentral) they added the ability to received text messages to the phone number (which currently is free). While technically somewhat of a text plan, one could theoretically sign up for a few accounts and be able to test multiple phone numbers.
http://www.google.com/voice/
Update (Nov 2010):
Perhaps an even better way to do this now is to use either Tropo (tropo.com) or Twilio (twilio.com). Both of them offer low cost SMS messaging and Tropo is free for development. I've been using Tropo and it's very quick and easy to setup and write and code for.
It would depend on the method of how you're sending out the SMS messages. If you're using the email method (<ten digit number>#<cell provider's doman>) you can fake it with a regular email account that can be purged automatically. If you're using an actual SMS publisher your best bet would be to refactor the design so that you can test that your function gets called the expected number of times, but doesn't actually send the messages. Then when you want to test the production-ready code you actually round up a group of people and try it out.
Having a provider that doesn't charge for incoming text messaging (like US Cellular) comes in handy for situations like that.
SMS text can be done under a few different protocols. I've had success with SMPP using the Easy SMPP .NET library and this java-based SMPP server simulator. It saved me a bunch of overpriced service charges.
you can send email to their phone:
18005551212#txt.att.net (IIRC)