MegaAPI icon

MegaAPI

Interact with MegaAPI WhatsApp service

Message → Send Location

AI-generated

Overview

This node operation sends a location message to a specified WhatsApp contact using the MegaAPI WhatsApp service. It is useful for scenarios where you want to share a geographic location with a contact, such as sending a meeting point, a business address, or a place of interest. For example, you can send the coordinates and address of a restaurant to a friend via WhatsApp.

Use Case Examples

  1. Sending a location of a restaurant to a contact for meetup.
  2. Sharing the office address with a client through WhatsApp.

Properties

Name Meaning
To (Contact) The WhatsApp contact to send the location to, formatted as phone_number@s.whatsapp.net (e.g., 551199999999@s.whatsapp.net). This is a required field.
Address The address or location description to accompany the location message. This is a required field.
Latitude The latitude coordinate of the location, which can be in decimal format (e.g., -15.7470795) or integer format (e.g., 157470795). This is a required field.
Longitude The longitude coordinate of the location, which can be in decimal format (e.g., -48.2982315) or integer format (e.g., 482982315). This is a required field.
Caption Optional caption text to accompany the location message, providing additional context or information.

Output

JSON

  • messageId - The unique identifier of the sent location message.
  • status - The status of the message sending operation (e.g., sent, failed).
  • to - The WhatsApp contact to whom the location was sent.
  • latitude - The latitude coordinate of the sent location.
  • longitude - The longitude coordinate of the sent location.
  • address - The address or description of the sent location.
  • caption - The optional caption text sent with the location.

Dependencies

  • MegaAPI WhatsApp service API key or token for authentication

Troubleshooting

  • Ensure the 'To (Contact)' field is correctly formatted as phone_number@s.whatsapp.net; incorrect formatting will cause message sending to fail.
  • Verify that latitude and longitude values are valid numbers and correctly represent the location; invalid coordinates may result in errors or incorrect location sharing.
  • Check that the MegaAPI credentials (API key or token) are correctly configured and have the necessary permissions to send messages.
  • If the message fails to send, review the error message returned by the node for specific details and adjust parameters accordingly.

Discussion