Register & read Telegram "Web push" notifications

73 Views Asked by At

Based on this Telegram API link:

10 - Web push (web push, see below) For 10 web push, the token must be a JSON-encoded object with the following keys:

endpoint: Absolute URL exposed by the push service where the application server can send push messages

keys: P-256 elliptic curve Diffie-Hellman parameters in the following object

  • p256dh: Base64url-encoded P-256 elliptic curve Diffie-Hellman public key

  • auth: Base64url-encoded authentication secret

  1. How can I generate requested parameters to register the device?

  2. Upon receiving at the endpoint URL, how should I decode incoming notification?


  • Everything happens on a ASP.NET Web API server and without a browser frontend.
  • I'm using WTelegramClient as wrapper around Telegram API
0

There are 0 best solutions below