Skip to content

sendVenue

Use this method to send information about a venue. On success, the sent Message is returned.

Parameters

business_connection_idStringOptional
Unique identifier of the business connection on behalf of which the message will be sent
chat_idIntegerStringRequired
Unique identifier for the target chat or username of the target channel (in the format @channelusername)
message_thread_idIntegerOptional
Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only
direct_messages_topic_idIntegerOptional
Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
latitudeFloatRequired
Latitude of the venue
longitudeFloatRequired
Longitude of the venue
titleStringRequired
Name of the venue
addressStringRequired
Address of the venue
foursquare_idStringOptional
Foursquare identifier of the venue
foursquare_typeStringOptional
Foursquare type of the venue, if known. (For example, "arts\entertainment/default", "arts\entertainment/aquarium" or "food/icecream".)
google_place_idStringOptional
Google Places identifier of the venue
google_place_typeStringOptional
Google Places type of the venue. (See supported types.)
disable_notificationBooleanOptional
Sends the message silently. Users will receive a notification with no sound.
protect_contentBooleanOptional
Protects the contents of the sent message from forwarding and saving
allow_paid_broadcastBooleanOptional
Pass True to allow up to 1000 messages per second, ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance
message_effect_idStringOptional
Unique identifier of the message effect to be added to the message; for private chats only
suggested_post_parametersSuggestedPostParametersOptional
A JSON-serialized object containing the parameters of the suggested post to send; for direct messages chats only. If the message is sent as a reply to another suggested post, then that suggested post is automatically declined.
reply_parametersReplyParametersOptional
Description of the message to reply to
Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user

Returns

On success, the Message object is returned.

GramIO Usage

ts
// Send a minimal venue with just coordinates, name, and address
bot
.
command
("office", (
ctx
) =>
ctx
.
sendVenue
({
latitude
: 37.7749,
longitude
: -122.4194,
title
: "GramIO HQ",
address
: "San Francisco, CA",
}) );
ts
// Venue enriched with Foursquare metadata for a richer card
bot
.
command
("cafe", (
ctx
) =>
ctx
.
sendVenue
({
latitude
: 48.8566,
longitude
: 2.3522,
title
: "Café de Flore",
address
: "172 Bd Saint-Germain, 75006 Paris",
foursquare_id
: "4adcda04f964a5208f3521e3",
foursquare_type
: "food/coffeeshop",
}) );
ts
// Venue with Google Places ID for Maps integration
bot
.
command
("museum", (
ctx
) =>
ctx
.
sendVenue
({
latitude
: 51.5074,
longitude
: -0.1278,
title
: "The British Museum",
address
: "Great Russell St, London WC1B 3DG",
google_place_id
: "ChIJB9OTMDIbdkgRp0JWbW3M4kM",
google_place_type
: "museum",
}) );
ts
// Reply to a message with a venue and navigation button
bot
.
command
("meetup", (
ctx
) =>
ctx
.
replyWithVenue
({
latitude
: 40.7128,
longitude
: -74.006,
title
: "Team Meetup Spot",
address
: "New York, NY 10007",
reply_markup
: new
InlineKeyboard
().
url
(
"Open in Maps", "https://maps.google.com/?q=40.7128,-74.006" ), }) );

Errors

CodeErrorCause
400Bad Request: chat not foundInvalid or inaccessible chat_id — verify the chat exists and the bot is a member
400Bad Request: VENUE_ADDRESS_INVALIDThe address field is empty or invalid
400Bad Request: VENUE_TITLE_INVALIDThe title field is empty or too long
400Bad Request: Bad latitude/longitudeCoordinates are outside valid ranges (latitude −90 to 90, longitude −180 to 180)
403Forbidden: bot was blocked by the userThe target user has blocked the bot
403Forbidden: not enough rightsBot lacks can_send_messages permission in the group/channel
429Too Many Requests: retry after NFlood control triggered — use the auto-retry plugin to handle this automatically

Auto-retry for 429 errors

Install the @gramio/auto-retry plugin to transparently handle flood-wait errors without manual retry logic.

Tips & Gotchas

  • Venue vs. Location. sendVenue shows a named card with title and address in Telegram — use it when you have a meaningful place name. Use sendLocation when you only have coordinates.
  • Foursquare and Google Places IDs are independent. You can provide either, both, or neither. When both are present Telegram prefers Google Places for the enriched card.
  • Coordinates must be valid floats. Latitude must be in the range −90 to 90 and longitude in −180 to 180. Out-of-range values result in a 400 error.
  • No live-location updates. sendVenue sends a static pin. If you need a location that updates in real time, use sendLocation with live_period.
  • The address is mandatory. Even if you supply a Foursquare or Google Place ID, the address field cannot be empty.
  • Venue messages cannot be edited to change coordinates. Once sent, the latitude/longitude of a venue message is fixed. Send a new message if the location changes.

See Also