I'm working with the Telegram API in my application and I need to handle updates.
The last line of the Working with Updates documentation says that Telegram can send push notifications for updates.
To subscribe to the push notifications, I need call the account.registerDevice method and pass in the token in the below format:
{
endpoint: Absolute URL exposed by the push service where the application server can send push messages,
keys: {
p256dh: Base64url-encoded P-256 elliptic curve Diffie-Hellman public key
auth: Base64url-encoded authentication secret
}
}
I have a few question about this data:
- Is
endpointthe URL in my application that receives updates? - What is
p256dhandauth?