skip to Main Content

I can’t seem to get the JSON POST data of the webhook. I set up everything correctly (the webhook URL, also tested if the server is getting POST requests) and the requests are coming when the user posts something, but no POST nor GET data is logged. Is this a common bug or is it just me?

3

Answers


  1. UPDATE

    A self signed cert is valid now.

    Login or Signup to reply.
  2. As they said:

    we will send an HTTPS POST request to the specified url, containing a JSON-serialized

    It’s a post, but they didn’t mentioned any parameter for us to get it, just a JSON value, so try get the raw input.

    For example in PHP I got it by using: file_get_contents('php://input')

    Login or Signup to reply.
  3. Also, another reason for not getting POSTs is that the certificate chain could be incorrect. No errors show on Firefox, but Chrome for Android complained.

    It’s explained in this thread on Reddit: https://www.reddit.com/r/Telegram/comments/3b4z1k/bot_api_recieving_nothing_on_a_correctly/

    As soon as I added the chain certificate file and restarted Apache, the requests started coming in.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search