WSAPI icon

WSAPI

Interact with WSAPI WhatsApp API

Overview

The node integrates with the WSAPI WhatsApp API to send a geographic location message to a specified WhatsApp contact or group. This operation is useful for automating the sharing of precise locations within WhatsApp conversations, such as sending meeting points, event venues, or delivery addresses.

Practical examples include:

  • A logistics company automatically sending delivery locations to drivers.
  • Event organizers sharing venue coordinates with attendees.
  • Customer support bots providing store locations to customers.

Properties

Name Meaning
To The WhatsApp contact ID or group ID to which the location will be sent. For contacts, use the phone number followed by @s.whatsapp.net (e.g., 1234567890@s.whatsapp.net). For groups, use the group ID followed by @g.us.
Latitude Geographic latitude coordinate of the location in decimal degrees. Valid range: -90 to 90. Example: 40.7128 for New York City.
Longitude Geographic longitude coordinate of the location in decimal degrees. Valid range: -180 to 180. Example: -74.0060 for New York City.
Address Optional human-readable address or place name to help identify the location (e.g., "Times Square, New York, NY").

Advanced Options

Name Meaning
Mentions Comma-separated list of phone numbers (without @) to mention in the message.
Reply To Message ID ID of an existing message to which this location message should reply.
Is Forwarded Boolean indicating if the message is forwarded.
View Once Boolean indicating if the message should disappear after being viewed (only applicable for media messages). Not applicable for location messages.

Output

The node outputs JSON data representing the result of the send location operation. This typically includes metadata about the sent message such as message ID, status, timestamps, and recipient information.

If the operation succeeds, the output JSON confirms that the location message was sent and may contain identifiers useful for further message management (e.g., replying or deleting).

No binary data output is involved in this operation.

Dependencies

  • Requires an active connection to the WSAPI WhatsApp API.
  • Requires configuration of an API key credential for authentication with the WSAPI service.
  • The base URL for the WSAPI endpoint must be set in the node credentials.

Troubleshooting

  • Invalid Contact or Group ID: Ensure the "To" field uses the correct format (phone@s.whatsapp.net for contacts, group@g.us for groups) and includes the country code without the plus sign.
  • Latitude/Longitude Out of Range: Verify that latitude is between -90 and 90, and longitude is between -180 and 180.
  • Missing Required Fields: The "To", "Latitude", and "Longitude" fields are mandatory; missing any will cause errors.
  • Authentication Errors: Confirm that the API key credential is valid and the base URL is correctly configured.
  • Message Sending Failures: Network issues or API limits might cause failures; check connectivity and WSAPI service status.

Common error messages usually indicate which required parameter is missing or invalid, or if authentication failed. Reviewing these messages helps quickly identify and fix input or configuration problems.

Links and References

Discussion