BaleMessenger icon

BaleMessenger

Interact with Bale Messenger API

Overview

The "Send Location" operation of the Message resource in this node allows users to send a geographic location message to a specified chat via the Bale Messenger API. This is useful for scenarios where you want to share a precise location with chat participants, such as meeting points, event venues, or delivery locations.

Practical examples include:

  • Sending your current GPS coordinates to a friend or group.
  • Sharing a business location with customers.
  • Broadcasting an event location in a group chat.

Properties

Name Meaning
Chat ID Unique identifier for the target chat where the location will be sent.
Reply Markup Additional interface options for the message; can be one of: Inline Keyboard, Reply Keyboard, Reply Keyboard Remove, or None.
Inline Keyboard Defines rows and buttons for an inline keyboard that appears next to the message (if selected in Reply Markup). Buttons can have text, callback data, or URLs.
Reply Keyboard Defines rows and buttons for a custom reply keyboard (if selected in Reply Markup). Buttons have text labels.
Reply Keyboard Remove Options to remove a custom keyboard from the client, including selective removal targeting specific users.
Latitude The latitude coordinate of the location to send. Must be between -90 and 90.
Longitude The longitude coordinate of the location to send. Must be between -180 and 180.
Horizontal Accuracy Optional horizontal accuracy of the location in meters (0 to 1500).

Output

The output JSON contains the response from the Bale Messenger API after sending the location message. It typically includes details about the sent message such as message identifiers and status confirmation.

No binary data is output by this operation.

Example output structure (simplified):

{
  "message_id": 123,
  "chat": {
    "id": "chatId",
    "type": "private"
  },
  "location": {
    "latitude": 12.3456789,
    "longitude": 98.7654321,
    "horizontal_accuracy": 10
  }
}

Dependencies

  • Requires an active Bale Messenger API authentication token configured in the node credentials.
  • Uses the official Bale Messenger Bot API endpoint https://tapi.bale.ai/bot.
  • No additional external services are required.

Troubleshooting

  • Invalid Chat ID: If the chat ID is incorrect or the bot is not a member of the chat, the API call will fail. Verify the chat ID and bot permissions.
  • Latitude/Longitude Out of Range: Ensure latitude is between -90 and 90, and longitude between -180 and 180.
  • Horizontal Accuracy Too High: The horizontal accuracy must be between 0 and 1500 meters.
  • Reply Markup Misconfiguration: If using keyboards, ensure the button definitions are correctly structured; otherwise, the API may reject the request.
  • API Authentication Errors: Confirm that the API token credential is valid and has not expired.

Common error messages usually come directly from the Bale Messenger API and indicate issues like invalid parameters or authorization failures. Checking the exact error message returned by the API will guide resolution.

Links and References

Discussion