{"action":"created","issue":{"url":"https://api.github.com/repos/python-telegram-bot/python-telegram-bot/issues/215","repository_url":"https://api.github.com/repos/python-telegram-bot/python-telegram-bot","labels_url":"https://api.github.com/repos/python-telegram-bot/python-telegram-bot/issues/215/labels{/name}","comments_url":"https://api.github.com/repos/python-telegram-bot/python-telegram-bot/issues/215/comments","events_url":"https://api.github.com/repos/python-telegram-bot/python-telegram-bot/issues/215/events","html_url":"https://github.com/python-telegram-bot/python-telegram-bot/issues/215","id":142862937,"number":215,"title":"Using of start_webhook","user":{"login":"clearsense","id":9950886,"avatar_url":"https://avatars.githubusercontent.com/u/9950886?v=3","gravatar_id":"","url":"https://api.github.com/users/clearsense","html_url":"https://github.com/clearsense","followers_url":"https://api.github.com/users/clearsense/followers","following_url":"https://api.github.com/users/clearsense/following{/other_user}","gists_url":"https://api.github.com/users/clearsense/gists{/gist_id}","starred_url":"https://api.github.com/users/clearsense/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clearsense/subscriptions","organizations_url":"https://api.github.com/users/clearsense/orgs","repos_url":"https://api.github.com/users/clearsense/repos","events_url":"https://api.github.com/users/clearsense/events{/privacy}","received_events_url":"https://api.github.com/users/clearsense/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/python-telegram-bot/python-telegram-bot/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":{"login":"jh0ker","id":3945220,"avatar_url":"https://avatars.githubusercontent.com/u/3945220?v=3","gravatar_id":"","url":"https://api.github.com/users/jh0ker","html_url":"https://github.com/jh0ker","followers_url":"https://api.github.com/users/jh0ker/followers","following_url":"https://api.github.com/users/jh0ker/following{/other_user}","gists_url":"https://api.github.com/users/jh0ker/gists{/gist_id}","starred_url":"https://api.github.com/users/jh0ker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jh0ker/subscriptions","organizations_url":"https://api.github.com/users/jh0ker/orgs","repos_url":"https://api.github.com/users/jh0ker/repos","events_url":"https://api.github.com/users/jh0ker/events{/privacy}","received_events_url":"https://api.github.com/users/jh0ker/received_events","type":"User","site_admin":false},"milestone":null,"comments":3,"created_at":"2016-03-23T05:01:14Z","updated_at":"2016-03-23T21:07:34Z","closed_at":null,"body":"I was using updater.start_polling() method and all was working fine, but polling do nothing most of time and spend traffic.\r\nSo, now i want use updater.start_webhook() and get new updates only when its come:\r\n``self.updater.start_webhook(listen='127.0.0.1',\r\n                                   port=443,\r\n                                   url_path=BOT_TOKEN)``\r\nI run it localy and it sometimes work (sometimes i had Error 400) and then i get:\r\n``2016-03-23 06:54:21,042 - telegram.utils.webhookhandler - DEBUG - Webhook Server started.``\r\nbut my bot don't react on commands.\r\n\r\nSo, question is how to do it right? \r\nMaybe i need to rewrite some other code or use setWebhook+flask instead. \r\nBut what start_webhook() is used for then?"},"comment":{"url":"https://api.github.com/repos/python-telegram-bot/python-telegram-bot/issues/comments/200543776","html_url":"https://github.com/python-telegram-bot/python-telegram-bot/issues/215#issuecomment-200543776","issue_url":"https://api.github.com/repos/python-telegram-bot/python-telegram-bot/issues/215","id":200543776,"user":{"login":"jh0ker","id":3945220,"avatar_url":"https://avatars.githubusercontent.com/u/3945220?v=3","gravatar_id":"","url":"https://api.github.com/users/jh0ker","html_url":"https://github.com/jh0ker","followers_url":"https://api.github.com/users/jh0ker/followers","following_url":"https://api.github.com/users/jh0ker/following{/other_user}","gists_url":"https://api.github.com/users/jh0ker/gists{/gist_id}","starred_url":"https://api.github.com/users/jh0ker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jh0ker/subscriptions","organizations_url":"https://api.github.com/users/jh0ker/orgs","repos_url":"https://api.github.com/users/jh0ker/repos","events_url":"https://api.github.com/users/jh0ker/events{/privacy}","received_events_url":"https://api.github.com/users/jh0ker/received_events","type":"User","site_admin":false},"created_at":"2016-03-23T21:07:34Z","updated_at":"2016-03-23T21:07:34Z","body":"The correct line would probably be \r\n\r\n    self.updater.start_webhook(listen='0.0.0.0', port=443, url_path=BOT_TOKEN, \r\n                               cert='path/to/cert.pem', key='path/to/key.key', \r\n                               webhook_url='https://mybot.pythonanywhere.com/%s' % BOT_TOKEN)\r\n\r\nThis should start the server to listen from updates from the internet and set the correct webhook url"}}