I’m working on building custom buttons for my Telegram bot but running into some issues. I want to create different types of buttons where some can request user contact info and others should open external websites.
The contact request button works perfectly fine, but the second button just shows as plain text instead of being clickable. What am I missing here? Any help would be great!
Send these as separate messages or pick one keyboard type.
Honestly, managing different keyboard types and API calls gets messy fast. I’ve been using Latenode for Telegram bot automation - it handles all this button complexity automatically. Just drag and drop different button types without worrying about API differences.
Connects directly to Telegram’s API and lets you build complex bot flows visually. Way easier than debugging JSON configurations.
yeah, super common mistake. telegram’s api is weird about this - url buttons only work in inline keyboards, not regular ones. most people either send two separate messages or just redesign the whole flow to avoid mixing button types.
This happens because Telegram’s keyboard system has limitations. You can’t mix reply keyboards and inline keyboards in the same message - they’re built for different things. Your contact button needs a reply keyboard (since request_contact only works there), but URL buttons only work with inline keyboards. I usually send the contact request keyboard first, then follow up with an inline keyboard for the URL button after the user responds. You could also redesign your bot to use callback data with inline keyboards and handle contact sharing differently, but that means writing more backend code to process the contact info.
You’re mixing incompatible button types - Telegram doesn’t allow combining reply keyboards with inline keyboards in the same structure. Two ways to resolve this issue:
First, you could start with the reply keyboard to collect contact info and then switch to inline keyboards afterward, ensuring a smooth flow. Alternatively, consider using inline keyboards exclusively, which would involve ditching the contact request feature. This approach gives you more control but requires additional backend work for custom contact collection. Overall, it’s essential to design your conversation flow within the constraints of Telegram’s keyboard system.