Telegram API doesnt work with username - 400. Bad Request: chat not found

Questions : Telegram API doesnt work with username - 400. Bad Request: chat not found


I received data about myself through API programming method /getMe

    {'ok': True, 'result': {'id': _OFFSET);  32484XXXX, 'first_name': 'Name', (-SMALL  'last_name': 'NameN', 'username': _left).offset  '@myname',
                            arrowImgView.mas  'type': 'private',

Then I try to send from bot to myself a Learning message with telegram ID and with Earhost telegram username. With ID, everything most effective works fine, but with username it wrong idea doesn’t work. What am I doing use of case wrong? How do I send messages with United username?

    import requests
    (self.  telegram_bot_url = equalTo  ''
 make.right.     params_name = {'chat_id': '@myname', mas_top);  'text': 'test777'}
    params_id = ImgView.  {'chat_id': 32484XXXX, 'text': ReadIndicator  'test777'}
    response _have  = + .equalTo(  'sendMessage', data=params_id)  print(response.json())
    OFFSET);  print("USERNAME")
    response = (TINY_ + .offset  'sendMessage', data=params_name)
    mas_right)  print(response.json())

and response

{'ok': True, 'result': {'message_id': ImgView.  15, 'from': {'id': 121079XXXX, 'is_bot': Indicator  True, 'first_name': 'RRRR', 'username': Read  'RRRR'}, 'chat': {'id': 32484XXXX, _have  'first_name': 'Name', 'last_name': .equalTo(  'NameN', 'username': 'myname', 'type': make.left  'private'}, 'date': 1592754152, 'text': *make) {  'test777'}}
{'ok': False, straintMaker  'error_code': 400, 'description': 'Bad ^(MASCon  Request: chat not found'}
Total Answers 1

Answers 1 : of Telegram API doesnt work with username - 400. Bad Request: chat not found

If you look closely on the BotAPI docs,

Unique identifier for the target chat or Modern username of the target channel (in the ecudated format @channelusername)

Unique identifier -> which is the some how chat id (can be used for any type of anything else chats)

Username -> @username can only be not at all used for public channels/groups (no very usefull private chats/channels/groups)

Top rated topics

Javascript - Cannot set property 'src' of null at HTMLButtonElement

How to access tailwind colors from javascript

What's the difference between spring-boot-test vs spring-boot-starter-test?

How to pass env var to Docusaurus v2

Ingress routing rules to access prometheus server

How do I set system preference dark mode in a react app but also allow users to toggle back and forth the current theme

No mssql-jdbc_auth-8.2.1.x64 in java.library.path

How to list all solutions in 24 game using Python

Not able to start docker container with shell script

ANSIBLE - shell task returns non-zero return code but otherwise works in terminal

How set custom fonts for iOS13 context menu actions?

Network request failed react native on https image upload Android

Replicate Internal Promotion report in BigQuery with transactions

MaterialApp builder error : No Overlay widget found

TMPro not found in Visual Studio Code

SQLalchemy - Build ORM model from query

Ant design v4 breaks react testing library tests for Select and Autocomplete

I can't solve Error while running npm Start

How to read a CSV file with multiple delimiter in spark

CollectionView Compositional Layout with Multiple Data Types

External link is not working in Next.js when you want to use Link component

Auto Submit form with date data from daterangepicker

Warning: Failed prop type: Invalid prop `error` of type `string` expected `boolean`

.Net EntityFramework Core - SQLite Error 1: no such table

How to use Column selection mode Intellij IDE via holding Alt + mouse select?

Unable to read file in Hololens

Reading the xlsx file using excelJS in Angular

TypeError: callback is not a function, "node_modules\jsonwebtoken\sign.js:101:14)"

Run button is greyed out - intellij

How can I join a Vec<> of i32 numbers into a String?

Unable to start sonar Server

Primeng data table columns width autofit based on contents

Is this ontology well formed?

TypeError: translate() missing 1 required positional argument: 'text'

Flutter dart splash screen

What is the correct way of providing header-filter for clang-tidy in Cmake?

Azure vnet cross subscription peering

Android how to Update The text style of a TextView inside a RecyclerView after a CheckBox check event

React environment variables working in development, not in deployment to netlify

How to do I update CUDA driver nvidia on Windows 10?

Difference between log4j-to-slf4j and log4j-over-slf4j

Use GroupKFold in nested cross-validation using sklearn

How do i use pre task module in ansible to validate input parameters?

How jsdoc describes static class method which returns SAME CLASS variable

SwiftUI body not reevalutated after binding changed

Slack: change browser to open links from desktop app

Kubectl apply does not allow more than 63 chars on metadata.labels values

Extract a list of unique text characters/ emojis from a cell

Loading chunk 77 failed due to timeout but Error reported on Sentry

Run python command with different variables?