You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 5, 2021. It is now read-only.
Hi
I want to subscribe for getting push notifications, according to telegram official blog I have to use account.registerDevice which in TLsharp currently not implemented.
I used SendRequestAsync to invoke the method, but I get Web_push_key_invalid error.
I don't know what to pass to the Token parameter of the request.
this is my code snippet: var json = "{\"endpoint\":\"https://www.xxx.com/api/telegram/webpush/1\"," + "\"keys\":{" + "\"p256dh\":\"" + Helper.Base64UrlEncode(publikKey) + "\"," + "\"auth\":\"" + Helper.Base64UrlEncode(auth) + "\"" + "}}"; var tlRequestRegisterDevice = new TLRequestRegisterDevice() {TokenType = 10, Token = json}; var notify = await client.SendRequestAsync<TLMethod>(tlRequestRegisterDevice);
the problem is I don't know what are the parameters publicKey and secret.
is publicKey the one of the key in api development panel?
how about the secret wich passes as "auth" to the request? where can I get this?
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi
I want to subscribe for getting push notifications, according to telegram official blog I have to use account.registerDevice which in TLsharp currently not implemented.
I used SendRequestAsync to invoke the method, but I get Web_push_key_invalid error.
I don't know what to pass to the Token parameter of the request.
this is my code snippet:
var json = "{\"endpoint\":\"https://www.xxx.com/api/telegram/webpush/1\"," + "\"keys\":{" + "\"p256dh\":\"" + Helper.Base64UrlEncode(publikKey) + "\"," + "\"auth\":\"" + Helper.Base64UrlEncode(auth) + "\"" + "}}"; var tlRequestRegisterDevice = new TLRequestRegisterDevice() {TokenType = 10, Token = json}; var notify = await client.SendRequestAsync<TLMethod>(tlRequestRegisterDevice);
the problem is I don't know what are the parameters publicKey and secret.
is publicKey the one of the key in api development panel?
how about the secret wich passes as "auth" to the request? where can I get this?
The text was updated successfully, but these errors were encountered: