Sending Location via WhatsApp is one of the essential needs for many businesses and industries. Given that WhatsApp is the world’s most popular messaging app, the ability to send location through the API can be a powerful tool for enhancing customer services. This new feature has recently been added to the API by Whatsiplus, allowing users to send locations to their customers worldwide in the simplest way possible.
Benefits of Sending Location via WhatsApp Using the Whatsiplus API
Adding the ability to send locations to the Whatsiplus API offers various applications across different industries and businesses. Below are some of the use cases for this feature:
1. Transportation and Logistics
Transportation and logistics businesses can use this feature to send precise vehicle locations, delivery routes, or notify customers about delivery times.
2. Customer Services
Online stores or service-based businesses can enhance the shopping experience by sending the locations of nearby centers or accessible warehouses to their customers.
3. Emergency and Medical Services
Rescue and medical organizations can use this feature to inform about the location of rescue teams or share the exact location of an incident.
4. Restaurants and Food Services
Restaurants can send the location of their branches to customers or request customers to share their location for more precise deliveries.
5. Tourism and Hospitality Services
Tourism companies can send the locations of tourist attractions or hotels to travelers.
Sample Code for Sending Location via WhatsApp Using the Whatsiplus API in PHP
To use the location-sending feature through the Whatsiplus API, you can use the following sample code. In this code, the geographic location, including latitude and longitude, is sent to the desired WhatsApp number:
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.whatsiplus.com/sendLocation/APIKEY?phonenumber=15551234567&lat=38.909346&long=-77.030509',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
How to Enable This Feature?
To use this feature, first, register on the Whatsiplus user panel, purchase the desired service, and obtain your dedicated API key. Then, specify the destination phone number, latitude, and longitude in the URL, and finally execute it in a browser.
https://api.whatsiplus.com/sendLocation/APIKEY?phonenumber=15551234567&lat=38.909346&long=-77.030509
Methods for Sending Location in Whatsiplus
You can send the desired location to your users through three different methods.
GET Method, POST Method, and Sending via JSON, all of which are fully explained in the API documentation.
Conclusion
The feature of sending location via WhatsApp using the Whatsiplus API is a powerful tool for automating and optimizing various services. With this capability, businesses can interact more accurately and professionally with their customers and create a better user experience. If you’re looking to enhance your communications on WhatsApp, consider integrating this feature into your services!