TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

How Telegram Messenger circumvents Google Translate's API

392 pointsby decryptover 3 years ago

44 comments

barnabeeover 3 years ago
Someone deleted an interesting comment about adversarial interoperability [0]<p>I’d love to see and give money to a project to create and maintain easy to use and stable “adversarial interoperability” APIs for as many services and products as possible.<p>Perhaps companies and projects would not often use these directly because of the risks (hopefully some would, though!) but individuals could drop the library or the URL to a server hosting it into their apps to gain extra features.<p>If standardised, whole open source apps could be built around them that allow querying and analysis of data from services and aggregating and automating using the services including optimising prices, taking advantage of offers, and using undocumented APIs to the users advantage.<p>Maybe something architected and incentivised like <a href="https:&#x2F;&#x2F;thegraph.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;thegraph.com&#x2F;</a> for adversarial intercom and undocumented APIs. Building as a network of nodes and funding with crypto would make it harder to attack and take down.<p>[0] <a href="https:&#x2F;&#x2F;www.eff.org&#x2F;deeplinks&#x2F;2019&#x2F;10&#x2F;adversarial-interoperability" rel="nofollow">https:&#x2F;&#x2F;www.eff.org&#x2F;deeplinks&#x2F;2019&#x2F;10&#x2F;adversarial-interopera...</a>
评论 #29747336 未加载
评论 #29747671 未加载
评论 #29749298 未加载
评论 #29756794 未加载
评论 #29754107 未加载
评论 #29754054 未加载
评论 #29747375 未加载
leodrieschover 3 years ago
I don’t understand the way this was implemented.<p>They are bound to get in trouble with Google for this, but they can’t easily pull the feature. They can’t just be like „oh you’ve had translate for two weeks now, but now we can’t pay for it, so it’s gone.“<p>What is the long term thinking behind this? Or is this just developers and management not communicating?
评论 #29748022 未加载
评论 #29748255 未加载
评论 #29747804 未加载
评论 #29753288 未加载
cjover 3 years ago
As a small company who spends $70-80k per year on Google&#x27;s official Translate API, it&#x27;s disappointing if Google allows this type of abuse to continue.<p>If they don&#x27;t want to pay, they should be using a free open source alternative like <a href="https:&#x2F;&#x2F;github.com&#x2F;LibreTranslate&#x2F;LibreTranslate" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;LibreTranslate&#x2F;LibreTranslate</a>
评论 #29748145 未加载
评论 #29753282 未加载
评论 #29748311 未加载
评论 #29748180 未加载
评论 #29747986 未加载
aenisover 3 years ago
This can&#x27;t work for long. Translate is a profit center for google, and this also shows others that they can disregard google&#x27;s monetization model for translate.<p>Commercial use of those APIs is common, despite translate being pretty expensive. Also, GCP current leadership is so hell bent on nickel-and-diming their customers, and their compensation packages are so dependent on value share growth, that they simply can&#x27;t afford anyone openly violating their pricing models. Especially a popular app. My guess is this will be down within the first week of January.
评论 #29747483 未加载
skinkestekover 3 years ago
As someone who has often defended Telegram I am somewhat puzzled by this one.<p>While the legal aspects of this might have to be decided by someone more skilled than me I feel they are morally on the same ground as early Google and if Google makes a big case of it it might backfire spectacularly.<p>More interesting is it that Telegram sends user texts directly to Google without any proxying (did I get that right and has the author studied it carefully enough?).<p>This might (again, if this blog post is correct and I read kt correctly) be an actual dangerous move from Telegram. Unlike the problems that many here worry about regarding E2E-encryption, this can potentially drag Telegram down to WhatsApp levels, sending huge amounts of user data straight into Google.<p>Then of course, we&#x27;ll need to see. Very much of what Telegram has done security wise is very well thought out and has improved over time.<p>Recently for example when I started my backup of one of the groups I participate in I had to confirm from a mobile client or wait 24 hours to start backup. Account recovery is almost automagically simple but has some nifty touches to prevent account hijacking. Settings to delete the account if I fail to log in has existed for years, I wonder if they even did this before Google launched it.<p>So now I am anxious to know if Telegram has done something brilliant again or if this is a turning point.
评论 #29750261 未加载
评论 #29748793 未加载
评论 #29750722 未加载
评论 #29748583 未加载
评论 #29752141 未加载
评论 #29753764 未加载
ckastnerover 3 years ago
I think it&#x27;s possible construct to construct a (very weak) argument for the random user agent rotation, but why split the spring if not to avoid being flagged.<p>On the other hand, I find it hard to believe that Telegram would risk a Play Store ToS violation, given how many tens of millions of users use the app.
评论 #29747064 未加载
评论 #29747148 未加载
评论 #29750092 未加载
评论 #29747164 未加载
评论 #29747727 未加载
drathover 3 years ago
On one hand, it&#x27;s quite asshole-ish. On the other, google is serving broken frontends to their services and charge ridiculous prices on their API&#x27;s. When I tried to make a third party search using google engine, I&#x27;ve exhausted the limit in less than an hour. It&#x27;d cost me like $40&#x2F;mo to get what I get for free using their crappy frontend.
评论 #29747688 未加载
评论 #29747526 未加载
zarzavatover 3 years ago
The following predictable chain of events will happen. Someone working at Google will read this blog post and report it internally. Google will contact Telegram and inform them that they are violating the Play Store agreement and could they please use the official API instead. Telegram will remove the feature as they can&#x27;t spend the GDP of the Earth on translations. The end.
评论 #29748726 未加载
评论 #29748590 未加载
评论 #29749427 未加载
评论 #29753782 未加载
mdasenover 3 years ago
&quot;It&#x27;s a bold strategy, Cotton. Let&#x27;s see if it pays off for &#x27;em&quot;<p>Deciding to use the Google Translate API in a way that bypasses Google&#x27;s API-key system seems like a dangerous game. Google controls your access to the Android platform† and now that this blog post has been published, it seems like Google could remove the app from the Play Store for unauthorized access of Google services.<p>If they&#x27;d found a way to use an API from some third party, maybe that third party would try and shut it down or whatnot. In this case, it feels like they&#x27;re poking the bear - especially given how much traffic they might throw at it. At some point, Google might get annoyed that an API that they charge a lot of money for is being used for free and somewhat legitimately remove Telegram from the Play Store. Google can pretty legitimately claim that the Telegram app was accessing Google&#x27;s servers in an unauthorized way and that they went through steps to obfuscate their access which shows that they knew what they were doing was wrong and tried to hide it.<p>This seems like a bold move. Google might simply shrug and not care. Google might decide that they&#x27;ll remove Telegram from the Play Store permanently. Google might decide they&#x27;ll only allow Telegram in the Play Store if it doesn&#x27;t have translation features. If Google removes Telegram from the Play Store, that&#x27;s basically the end of Telegram. As people bought new phones, the number of people reachable on Telegram would dwindle‡. As the app no longer could receive updates, eventually it would become old and stale. They&#x27;d have to start moving to another platform whether WhatsApp or Signal or Matrix.<p>†sure, other stores and side-loading exist on Android, but Google does control access for the vast majority of Android users (at least in the US&#x2F;Europe).<p>‡yes, maybe one can transfer apps and side-loading does exist, but the number of users would dwindle
评论 #29749020 未加载
kedmiover 3 years ago
It&#x27;s smart.<p>It allows Telegram users to hide in plain-sight, within the noise of other Google Translate web users.<p>I&#x27;m pretty sure that using the official pre-built java SDK, as suggested by the author, would allow Google to cluster the content of Telegram users (since app-specific id&#x2F;token should be sent).<p>Other than that, a great read and kudos to the author for shedding light on it.<p>Edit: typo.
评论 #29747131 未加载
评论 #29747495 未加载
评论 #29747698 未加载
评论 #29747089 未加载
评论 #29747307 未加载
评论 #29749530 未加载
rossmohaxover 3 years ago
Telegram should have disclosed that every time someone uses this feature, their IP address is leaked to Google.
评论 #29747424 未加载
评论 #29749444 未加载
评论 #29747390 未加载
评论 #29747322 未加载
评论 #29750445 未加载
评论 #29747969 未加载
yositoover 3 years ago
I really don&#x27;t understand this. Is Telegram a legitimate app? If so, then why are they attempting to rip off other companies&#x27; work without paying them? You want an integration with a translation API? Then pay a fair price for one, or build your own?<p>If Telegram really can&#x27;t afford an integration, just make a translate button that opens a link to <a href="https:&#x2F;&#x2F;translate.google.com&#x2F;?sl=es&amp;tl=en&amp;text=API%20de%20traducci%C3%B3n%20para%20pobres" rel="nofollow">https:&#x2F;&#x2F;translate.google.com&#x2F;?sl=es&amp;tl=en&amp;text=API%20de%20tr...</a><p>Edit: not to mention the privacy implications of sending messages to Google.
评论 #29750646 未加载
01acheruover 3 years ago
I used something like this years past for image resizing, the URL was: <a href="https:&#x2F;&#x2F;images1-focus-opensocial.googleusercontent.com&#x2F;gadgets&#x2F;proxy" rel="nofollow">https:&#x2F;&#x2F;images1-focus-opensocial.googleusercontent.com&#x2F;gadge...</a><p>It is now blocked, always responds 403, maybe tweaking some request parameters can make it work again.<p>Edit: if you want to try it out the parameters I used were:<p>- container: focus (there are other values I cannot find anymore)<p>- url: urlencoded URL of the image to be resized<p>- resize_w: width in px<p>- resize_h: height in px
评论 #29748064 未加载
dandiepover 3 years ago
One thing I don&#x27;t see mentioned here is that the Google Cloud version of Translate is actually different than the user-facing one at translate.google.com. At least when I tried it a year ago, the Google cloud version was vastly inferior. I suspect it has to do with licensing agreements around certain datasets. Very curious if anyone knows more on this...
ape4over 3 years ago
There are bound to be duplicate phrases for translation over all the many Telegram users. Why not cache to avoid API calls. How many times do you have to use the API to translate &quot;OK&quot; or other commonly used words.
Const-meover 3 years ago
Visiting a publicly available web page doesn’t create contractual obligation between end users and web server owners.<p>If Google views what telegram doing as abuse, then how it’s different from what end users are doing while interacting with <a href="https:&#x2F;&#x2F;translate.google.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;translate.google.com&#x2F;</a> web page? Especially if these end users are running an ad blocker or two in their web browser? BTW, uBlock origin blocked 4 pieces of content on that web page.
评论 #29753015 未加载
morelishover 3 years ago
Quite a lot of libraries exist to do this. But doing this in an app with a large user base looks offensive. Solution would be for some decent open source translation APIs to appear.
评论 #29748682 未加载
bencollier49over 3 years ago
Using undocumented API features in a commercial product seems a bit fly-by-night to me - doesn&#x27;t convey the best impression of the company.
评论 #29748156 未加载
ssl232over 3 years ago
I guess, given its popularity, Google won&#x27;t kick Telegram off the store for obfuscating the URL and using an unauthorised (?) API endpoint but I imagine this will get them in some sort of trouble.
评论 #29751131 未加载
评论 #29748336 未加载
homamiover 3 years ago
Off topic, but this is a code smell for me: [(int) Math.round(Math.random() * (userAgents.length - 1))]); This leads to a lower probability of selecting the 0th and the last items in the array.
评论 #29747484 未加载
88840-8855over 3 years ago
Another useful feature, interesting article to look how it works under the hood.<p>And again, i wonder how a tiny team can push such great and useful features into such amazing UI. And then I&#x27;m looking at other alternatives, from naked WhatsApp over laggy wechat to horrible UX in signal.<p>What&#x27;s the reason for telegram amazing performance and features?
评论 #29747038 未加载
评论 #29747035 未加载
评论 #29747713 未加载
评论 #29748202 未加载
malfover 3 years ago
Is this an option for encrypted chats as well? Is there a warning that the content gets sent to Google?
评论 #29747300 未加载
littlecranky67over 3 years ago
Not sure if this is a smart move, especially since they piss off the same company that could remove them from the Play Store in no time.
oefrhaover 3 years ago
This reminds me of my own usage of Google Translate&#x27;s speech synthesis API in a chat bot way back. It was as easy as sending a GET request to <a href="https:&#x2F;&#x2F;translate.google.com&#x2F;translate_tts" rel="nofollow">https:&#x2F;&#x2F;translate.google.com&#x2F;translate_tts</a>. People loved it.<p>Of course, my use case was neither commercial nor large scale.
taubekover 3 years ago
I see few possible issues: 1) If this is some kind of hack to reduce the cost this means that Google can pull the plug to this at any given time 2) How many users are aware that this means that the content is sent to Google? Yes, there is a warning on the screen where you turn one the option but will the users see it?
arihantover 3 years ago
My guess would be (given the size of that array) that this is done to prevent rate limits rather than cost. It could be that this was advised by Google themselves because they could not provision the correct rate limits due to end of year. It&#x27;s hard to imagine a client of this size isn&#x27;t in direct contact with Google Cloud engineers. Pretty sure they&#x27;re paying for it too. Also, this may have been done just for the open source commit of the project to prevent leaking token? Can&#x27;t jump to conclusions here.<p>Google does the same thing in Google Pay Indian version. Government mandated that no one app can have more than 25% transaction volume of the country for UPI. So Google partnered with 4 banks, essentially having 4 UPI apps in the eyes of government.
评论 #29750007 未加载
评论 #29752120 未加载
bratwurst3000over 3 years ago
Someone else thinks that telegramm is only a coverup by the cia or russians to get data from people? I mean an app that tracks the living shit out of you and saves all your data unencrypted on their server and is the host of some rly strange groups…. Pure gold for such agencies
jlelseover 3 years ago
On iOS Telegram uses a system API, but on Android they seem to try to avoid the high Google Cloud fees: <a href="https:&#x2F;&#x2F;jlelse.blog&#x2F;posts&#x2F;telegram-translation" rel="nofollow">https:&#x2F;&#x2F;jlelse.blog&#x2F;posts&#x2F;telegram-translation</a>
评论 #29747398 未加载
emilfihlmanover 3 years ago
These comments are funny.<p>Here&#x27;s a thought for you, though:<p>Telegram can be used just fine without Google Play Store. If Google blocks this new and cool feature and people like this feature, it only serves to push people into skipping the playstore completely because people are invested in their messaging applications.<p>Now, normalising downloading and installing applications from outside the Play Store is a big red flag to Google.<p>This is possibly the most genious and awesome thing Telegram has done, and imho an excellent play. Either TG gets cool new features easily, or people get freedom and still get cool new features.<p>I&#x27;m very interested in how this is going to play out!
评论 #29753253 未加载
Namidairoover 3 years ago
I remember seeing the aforementioned API endpoint being used a while ago for some automatic chat translation.<p>From what I remember, there was some minor rate-limiting that I hit once or twice while using it, which complicated things a little.
brookmgover 3 years ago
Is it just me who thinks this is a work of a junior or intermediate dev to show a POW? I am sure they are working on some internal service to be used for translation but just worked on it fast to make it a 2021 feature.
zoomablemindover 3 years ago
Very questionable decision, rather irresponsible one to all parties involved. I hope this won&#x27;t devolve into a &#x27;rogue-dev&#x27; blame, the company has to own it up.<p>I wonder if an alternative route could be somehow leveraging google&#x27;s own app. The Translate app is likely already installed on user&#x27;s platform. So is there a way to send the user&#x27;s translation requests to the app?<p>It&#x27;s almost a unix-approach, a tool for a task. Instead of a megatool for all-you-want.
评论 #29769923 未加载
oztenover 3 years ago
This is an interesting data point for folks designing demo pages. The API was discovered by playing with the demo page [1] according to a link from a link in the article<p>[1] <a href="https:&#x2F;&#x2F;weblog.west-wind.com&#x2F;posts&#x2F;2011&#x2F;aug&#x2F;06&#x2F;translating-with-google-translate-without-api-and-c-code" rel="nofollow">https:&#x2F;&#x2F;weblog.west-wind.com&#x2F;posts&#x2F;2011&#x2F;aug&#x2F;06&#x2F;translating-w...</a>
Jerrrryover 3 years ago
When a dev gets a requirement and no red tape is involved.
alpineidyll3over 3 years ago
Bahhh do you want to get captchas? THIS IS HOW YOU GET CAPTCHAS!!!
mrjinover 3 years ago
So a big no to use Telegram? I thought Telegram claimed to provide private communication, so now it will send contents to Google for translation? Hmmm...
Markoffover 3 years ago
why even bother with any API, just implement it on client side as regular browser with regular google translate request through URL like <a href="https:&#x2F;&#x2F;translate.google.com&#x2F;?sl=auto&amp;tl=en&amp;text=hello%20world&amp;op=translate" rel="nofollow">https:&#x2F;&#x2F;translate.google.com&#x2F;?sl=auto&amp;tl=en&amp;text=hello%20wor...</a>
bryanp2021over 3 years ago
If Google has been collecting (translating) users data, is that a good time for them to release them to everyone?
gregoriolover 3 years ago
Nobody pays for using Telegram, so why would Telegram pay for using... oh...
lowdoseover 3 years ago
Yandex image search is superior to google image search because it does not interpret the content to a string and searches for this “one liner” but searches actually for similar images.<p>Yandex also has Papiamento in their text translation. Which Google doesn’t support at all.
einpoklumover 3 years ago
I wonder how useful this, considering how Telegram conversations are unencrypted by default. If they were to change this default, now _that_ would be something.
bacanover 3 years ago
Telegram is just spyware. Whatsapp is better. Signal is the best
ilrwbwrkhvover 3 years ago
Nice hackers way of thinking. This is what makes telegram the best.
poloteover 3 years ago
Is there any proof in this post that Telegram actually circumvent Google Translate API ? Because it is also possible that Google told Telegram to use the method explained in the article.
评论 #29747685 未加载
评论 #29748101 未加载