Telegraf: Webhook problem

Created on 5 May 2017  路  3Comments  路  Source: telegraf/telegraf

Hello,
If I create a webhook over the telegram api like this:
https://api.telegram.org/botxxxxxxxxxxxxxxxxxxxx/setWebhook?url=https://(myherokuapp).herokuapp.com/telegram/(randomToken)

and some code like this:

app.telegraf.startWebhook(app.get('bot-webhook'), null, 5000)
app.use(app.telegraf.webhookCallback(app.get('bot-webhook')))

I get this error:

Failed to get updates. Waiting: 1s { Error: 409: Conflict: can't use getUpdates method while webhook is active
     at buildPayload.then.then.then.then (/app/node_modules/telegraf/lib/network/client.js:102:17)
     at process._tickCallback (internal/process/next_tick.js:109:7)
   code: 409,
   response: undefined,
   description: 'Conflict: can\'t use getUpdates method while webhook is active',
   retryAfter: undefined,
   migrateToChatId: undefined }

I'll wait for response. 馃槃

question

Most helpful comment

Hello.

Do you call startPolling? If yes, you need to remove this that call.

All 3 comments

Hello.

Do you call startPolling? If yes, you need to remove this that call.

Yes I call startPolling. I try that later.

Yes it works, but now I have a problem with express. But I think I can solve that. Thanks for help. 馃槃

Was this page helpful?
0 / 5 - 0 ratings

Related issues

trgwii picture trgwii  路  3Comments

expelliamus picture expelliamus  路  3Comments

ghost picture ghost  路  3Comments

MohGanji picture MohGanji  路  3Comments

wilcorrea picture wilcorrea  路  3Comments