Search This Blog

Showing posts with label c#. Show all posts
Showing posts with label c#. Show all posts

Tuesday, August 27, 2019

Telegram - Broadcast or Send Message through Programming Java Python C# VB

1. Create a bot token through @botfather.
           1.1 Install Telegram
           1.2 Login to telegram
           1.3 on Search window type @botfather and select
           1.4 type one by one until you see Done !, Congratulations , your token
                     /start
                     /newbot
                    drvautobot     (username)
                   
                   Done !, ...
                   token    123456:dsfd..

2. Copy this token and keep it.
   
3. Open telegram and create new channel.
     Ex: autobot
     3.1 open autobot channel window
     3.2 click on top to see administrators , click
     3.3 search @drvautobot (bot username), select
     3.4 assign as administrator

Thats it.
Now use browser or programing with GET method.

browser
https://api.telegram.org/bot/sendMessage?chat_id=@&text=hello

ex: https://api.telegram.org/bot123456:dsfdadsfsdfdsfahgjhgsfd/sendMessage?chat_id=@autobot&text=hello

response 
{"ok":true,"result":{"message_id":2,"chat":{"id":-1001493064021,"title":"Autobot","username":"infovijay","type":"channel"},"date":1566909775,"text":"hello"}}




open your channel window and see the text hello.


Enjoy

Thursday, December 21, 2017

Error: The server encountered an error processing the request. See server logs for more details

This issue comes into picture whenever there is any issue at WCF service.
So see more details about the issue, you need to includeexceptiondetailInfaults attribute to true in servicedebug tag.

Go to your web.config


<servicebehaviors>
        <behavior name="myServiceBehavior">
          <servicedebug includeexceptiondetailinfaults="true" />
        </behavior>
</servicebehaviors>

Either you can also add class attribute to the service class.

Hit Counter


View My Stats