Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

determining setWebhook result #36

Closed
vynes opened this issue Sep 14, 2015 · 1 comment
Closed

determining setWebhook result #36

vynes opened this issue Sep 14, 2015 · 1 comment

Comments

@vynes
Copy link

vynes commented Sep 14, 2015

Sorry if this is wrong place but I cannot find any other place to ask questions.

I am trying to use setWebhook to register my web hook url and upload a self-signed certificate but running into issues:

I use setWebhook($url, $cert) where $url is https://mydomain/webhook/sometoken and $cert is inputFile resource ( i also tried with only filename which also seems acceptable and handled appropriately).

A dump of the return I get is this:
object(Telegram\Bot\Objects\Message)#187 (1) { ["items":protected]=> array(1) { [0]=> bool(true) } }

What does this mean? Did it fail? It does not work as there are no incoming requests to my server when I trigger it with /start from a client.

The webhook did register because when I do a manual getUpdates() it complains that web hook is already present. If I remove the webhook I get a nice return from removeWebhook() and using getUpdates() manually thereafter works fine.

So my question is how do I figure out what the problem is? The url is correct, I've double checked it. I don't think the certificate is a problem as there is no entry in Apache access log of a request from Telegram.

Thanks.

@vynes
Copy link
Author

vynes commented Sep 16, 2015

Since last try I have:

  1. Regenerated self-signed certificate with name and common name same as FQDN of the server where bot is running.
  2. Ran setWebhook() from the same domain as registered certificate.

It works now although I'm still not sure why exactly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant