I'm using @tonconnect/sdk in my telegram chatbot (on backend) to authorize telegram users. Everything was great, until my bot was published in 1.5M telegram channel, s.t. right now it comes with 30RPS.
The claim: bridge.tonapi.io, which is used in TonKeeper (the most popular wallet in TON) has Flood Control on theirs' servers, because of which my bot was banned. I wrote them, and they gave me token for Authorization header, BUT, I'm unable to put it inside your library: no functionality.
So I had to patch JS code, and I think, that it is not the best way for things to work.
Expected behavior
Add ability to send custom headers with your fetch requests (for example, authorization) on the servers, OR, create smth like DEV apps on the bridge side, s.t. this situation won't happen anymore.
Current behavior
I'm unable to send any headers any other way then patching the source code.
Right know it is not really popular issue, but if the TON community grew, then it would be a big problem.
Steps to Reproduce
Run a chat bot with 10RPS.
Send QR code for each user (from your backed) to authorize him in tonkeeper
Get the flood control error
Send the message to develepers, get the Authorization header and realize, that the only way to work with it - "inject" it in the source code of your library.
Describe the bug
I'm using @tonconnect/sdk in my telegram chatbot (on backend) to authorize telegram users. Everything was great, until my bot was published in 1.5M telegram channel, s.t. right now it comes with 30RPS. The claim: bridge.tonapi.io, which is used in TonKeeper (the most popular wallet in TON) has Flood Control on theirs' servers, because of which my bot was banned. I wrote them, and they gave me token for Authorization header, BUT, I'm unable to put it inside your library: no functionality.
So I had to patch JS code, and I think, that it is not the best way for things to work.
Expected behavior
Add ability to send custom headers with your fetch requests (for example, authorization) on the servers, OR, create smth like DEV apps on the bridge side, s.t. this situation won't happen anymore.
Current behavior
I'm unable to send any headers any other way then patching the source code. Right know it is not really popular issue, but if the TON community grew, then it would be a big problem.
Steps to Reproduce
Environment
├─┬ @ton/blueprint@0.19.1 │ └─┬ @tonconnect/sdk@2.2.0 │ ├── @tonconnect/isomorphic-eventsource@0.0.1 │ ├── @tonconnect/isomorphic-fetch@0.0.2 │ └── @tonconnect/protocol@2.2.6 deduped └─┬ @tonconnect/sdk@3.0.0 ├── @tonconnect/isomorphic-eventsource@0.0.2 ├── @tonconnect/isomorphic-fetch@0.0.3 └── @tonconnect/protocol@2.2.6
Additional context
:)