Skip to main content

What is the api of WhatsApp?


What is the api of WhatsApp?
WhatsApp has released a “Click to Chat” function where you can create links where the person can start a conversation  with you without  it having the saved phone number. With this function you can even add standard texts for the person to send to you.

How to Fix WhatsApp Api in Desktop Browsers
What’s the problem?
There are two bases for you to do this solution: api.whatsapp and web.whatsapp. Throughout the internet you will find people teaching with api., However in some tests I realized that it does not work in Firefox and Safari desktop browsers. These only work the web.whatsapp and the web does not work on mobiles.



A Change where “YOURNUMBER” is by its number in the following format 15551234567, without the “+” and “()”..
Replace the text “YOURTEXT” with what you want the person to send by changing the space for “+”. Ex. “I+Want”
Save the file named index.php and upload it to your server.

How to Solve?
This can be solved with a simple script that will redirect the user according to the device he is using.


<?php
// Fix Api Whatsapp on Desktops
// Dev: Jean Livino
$iphone = strpos($_SERVER['HTTP_USER_AGENT'],"iPhone");
$android = strpos($_SERVER['HTTP_USER_AGENT'],"Android");
$palmpre = strpos($_SERVER['HTTP_USER_AGENT'],"webOS");
$berry = strpos($_SERVER['HTTP_USER_AGENT'],"BlackBerry");
$ipod = strpos($_SERVER['HTTP_USER_AGENT'],"iPod");
// check if is a mobile
if ($iphone || $android || $palmpre || $ipod || $berry == true)
{
 header('Location: https://api.whatsapp.com/send?phone=YOURNUMBER&text=YOURTEXT');
 //OR
 echo "<script>window.location='https://api.whatsapp.com/send?phone=YOURNUMBER&text=YOURTEXT'</script>";
}
// all others
else {
 header('Location: https://web.whatsapp.com/send?phone=YOURNUMBER&text=YOURTEXT');
 //OR
 echo "<script>window.location='https://web.whatsapp.com/send?phone=YOURNUMBER&text=YOURTEXT'</script>";
}

Comments

Post a Comment

Popular posts from this blog

Bitcoin Trading

Bitcoin trading is not much different than stock trading and you can just as easily purchase and sell them. bitcoin is virtual currency just like other regular currency allows you to trade goods and services but unlike them,  bitcoin works  on  Blockchain technology  that makes it, decentralized. This indicates that it is not issued, controlled or owned by any single authority. The transaction on each block is verified by the computers. The problem with bitcoin was the transaction speed. It takes about 10 minutes to process a transaction which is far more than when compared to bank credit cards speed. This has influenced the data miner all around the world to look for the substitute fork for bitcoin. There are three different types of trading that you can look into and choose from. Day trading avails multiple trading throughout the day to ensure the exploitation of short-term price movements for optimum profit. This type of trading goes on throughou...

How to pick crypto for day trading?

Day trading cryptocurrency could be an unbelievably profitable venture for those who put in the work and remember the golden rules of trading. If you’re thinking about day trading, let’s dive in and get the low-down on how it’s done. There are a number of ways to profit from cryptocurrency, but Bitcoin Trading South Africa is most likely the fastest. Day trading involving speculating on the price of currencies, and then buying and selling them within the course of a day to make a profit. What is day trading? When people talk about Bitcoin Trading South Africa , they are referring to buying and selling an asset with the aim of making a profit. For example, in the real-world stock exchanges, people trade all kinds of things. This can include stocks and shares like Apple, currencies like U.S. Dollars, and even metals such as Gold and Silver. Whatever is being traded, the objective is the same. Buy an asset and then sell it for more than you paid for it! This is exactly the same as b...

Israeli crypto wallet start-ups KZen raises $4 million

  Israeli crypto wallet start-ups KZen raises $4 million While it seemed like the wide variety of different wallets to preserve your cryptocurrencies couldn’t move any better, the Israeli start-ups KZen raised $4 million in investment to get but any other one available on the market. The list of investors participating within the spherical includes Benson alright Ventures, Samsung next, and Elron Ventures. The new pockets app has now not been unveiled to the public but and is poised to launch later this month. “We wanted for ourselves and for the arena something that did not experience like a pre-AOL revel in, that changed into extraordinarily advanced in phrases of protection and easy to use,” said Ouriel Ohayon, the CEO of the start-up and a former editor of the tech industry booklet TechCrunch. “We desired a solution that brings peace of mind and that did no longer force the person into compromising among convenience and protection that is, regrettably, the contemporar...