Syncing Telegram contacts without phone/API - telegram

Short: is there a way to let Telegram Windows sync my contacts that I'm storing on my computer in xls/vcf/csv format?
Long: I need to let Telegram Windows (or web) access a xls/vcf/csv-formatted file, that is saved on my local computer, where my contacts are stored. I tried to find a Telegram Windows version/software/platform that has this capability but unfortunately all versions assume you have already uploaded your contacts through your phone or via importing them via API, neither of I which I want to use.
Since Telegram is an open source, I would imagine that implementing a contacts-syncing-capable Windows- (or web-) based software is doable (?). However, before I start implementing one, I thought I would ask in case anyone is aware of an existing one that already has this feature.

Related

Use guid to register instance of xamarin forms app

Good day fellow code ninjas,
I am attempting to make my Xamarin forms application be device unique in the sense that you are not able to login with your credentials on any device other than the one you initially installed the application on.
I have deduced that I should be using a guid for this purpose. I have searched online but I'm not able to find much of a guide on how exactly to use a guid to recognize a specific device.
Are there perhaps any resources related to this or any examples of code used to accomplish this?
There are a few layers to this question, firstly:
Can I Uniquely Identify A Device? No
You won't be able to get truly uniquely identifying information about the device such as UDID, IMEI. This is enforced by the platforms (iOS & Android) as a way of protecting users sensitive information.
This process is called Fingerprinting. There are 2 cases that the platforms want to avoid: Advertisers tracking users across apps, Malicious use of unique id's to target a user. In older versions of iOS & Android there were more API's to use to uniquely identify a user but they are being phased out as privacy & security have become greater concerns for mobile users.
What Are My Options?
Lets accept that we can never truly uniquely identify a device, there are some tricks we can use.
Secure Storage
You can generate a guid and place it in secure storage on the devices keychain. This keychain value can be persisted even if your app is uninstalled. You could use this approach to check if the app is unique to the user. There are pitfalls with this approach, it's not perfect but it's the approach myself and many other's use.
It is worth mentioning the behaviour across devices is very inconsistent. The iOS keychain can be backed up to iCloud (if encryption is enabled). Android devices can use slightly different standards across API levels & vendors.
iOS - identifierForVendor
iOS will generate a guid when you install an app, you can use this value instead of generating your own. See the documentation here.
The 2 drawbacks here are you'd need to implement this on a platform level and if they user deletes all of your apps, the guid gets deleted and a new one is generated when they reinstall the app:
The value in this property remains the same while the app (or another app from the same vendor) is installed on the iOS device. The value changes when the user deletes all of that vendor’s apps from the device and subsequently reinstalls one or more of them. The value can also change when installing test builds using Xcode or when installing an app on a device using ad-hoc distribution. Therefore, if your app stores the value of this property anywhere, you should gracefully handle situations where the identifier changes.
Edit 1:
Add further clarification: Explain fingerprinting & highlight some platform nuances

Sending pictures from photobooth to phone via WeChat

My boss has charged me with the task of finding how to integrate WeChat into our photobooth's "Total Share" section.
Our photobooths work under windows and their software is a mix of Java and a PHP web API installed locally, that then connects to a web service.
The intention is to give the user the option to, when their picture is done, get a copy of it via WeChat (I guess that by introducing it's phone number)
Through my searches I've found a WeChat JS-SDK, but that seems to connect sites you are watching on your phone with your actual WeChat app so it doesn't work in my case.
The other source I have found is the Official Account Admin Platform, but I'm not really sure if this would allow me to do what I need. As far as I've seen, the Official Account can send messages in response to a trigger (that would work for me, send a message when the user clicks on the button), but it also seems to need that they "subscribe" (in a way) to the Official Account, and secondly I'm not sure how can this be automatized.
Especial mention:
I'm a junior developer, so API integration is a bridge I haven't crossed yet, and as such I'm utterly lost.
Is it possible to get the functionality I require? If so, what are the steps to do it?
You don't need to make a fully fleshed tutorial to write an answer, just knowing in what direction should I go, and maybe some possible caveats that more experienced developers may be able to foresee, would be great.
Thanks.

Password protect audio file for Whatsapp based service

I'm creating a service which sends audio files via Whatsapp to it's users daily.
The thing is that i want to prevent people from sharing the audio files, so i thought of password protection of each audio file sent, with passwords composed by the user's sensitive information (example: social security number or equivalent, so that the user would be discoraged to pass along his own password to strangers online).
I've been looking for a solution (without success so far) with 4 requirements in mind:
1) It needs to encrypt the file itself, not a folder that contains it
2) Audios must be easily sent and accessed via Whatsapp
3) Audios must be opened by customers without requiring the installation of apps. Just tap in the password and that's it.
4) It needs to work offline.
If there are other solutions to prevent or at least make file sharing more difficult without getting in the way of the user experience, please point out. Just keep in mind that it has to work in a Whatsapp broadcasting context, both in Android and IOS.
I know that everything online can and will be pirated, but i want to just make an effort to protect the product.

can Telegram CLI mimick Telegram bots?

I saw on internet that there is some programs that can use Telegram CLI.
I want to choose between them
for Telegram bot API there is much more documents explaining its functionality, but for CLI there isn't much that explains its features
it seems the only way to know about is to experiment with it.
unfortunately i don't have a linux distro installed on my pc so experimenting isn't an option right know.
so I thought to ask from people who already used it
I know about Telegram bot api, its powers and its limitations
here is my questions:
what can I do using Telegram CLI that I can't do with with bot api, and vice versa?
Telegram bot API:
do not require to register new Telegram account, so you don't need to have another phone number;
bot cannot write to user first, only after user sends a first message to bot;
already has the commands interface (/command);
can do stuff by simple HTTP POST (by sending request via cURL, for example). So you can hook to this tons of stuff (notifications about new articles at the website or so);
you can rather easily create lots of them;
you can write you own implementation in almost any programming language;
you have a list of bots you have created (thanks to #BotFather). If you have lost somehow control of your bot - just revoke the token via #BotFather and it's yours again;
pretty simple to use.
Telegram client application (in this case - CLI):
requires new Telegram account registration with phone number;
acts like any other actual Telegram user (can write to other users first, without invitation). Well, that's a good thing;
not really good cross-platform abilities for now (some lack of CLI-realisations);
not really easy to install and use;
you have to implement the commands handling part;
if you have lost your phone number - pretty much you lose this account, because it's not like you would make some precautions for CLI client account. So you will have to register a new one and repeat the setting procedure for client.
In conclusion, bots actually got rid of CLI clients, in my opinion. I had CLI account right to the moment the bots appeared. After that I deleted it and created a bot. And not just one :)
So, bots are for the "robot" stuff, and real accounts are for the real people.
The Telegram CLI library interacts directly with their MTproto protocol, which means it's like their desktop/mobile app...but for the console. You can send messages from one phone number to another. This means that when authenticating with the CLI application, you use your real number as if you were logging into the mobile application.
I wouldn't suggest using it for bot behavior as you have to write an application that wraps the Telegram CLI and parses the log file as it is displayed...since it doesn't implement all the MTproto methods and the outputs for the log file are custom...it can be quite annoying and different than what you would expect.
With Telegram CLI you can send a number to another Telegram user without having them initiate the conversation first (since it functions just like a normal Telegram client) where the Bot API requires the user to add the Bot and start interaction before the Bot knows you are there.
previous answers are almost correct. Two different interfaces for different purposes:
Telegram Bot API allows to develop a Telegram Bot.
Telegram CLI (as this one, as an implementation example: https://github.com/vysheng/tg) are telegram client implementations, running from command line, based on MTproto protocol, as Chris Brand said.
As a bot developer, I'm interested to have a TG CLI interface (2) to automatize dialogs tests, with bash scripts, with a bot made with (1).

QT: Add e-mail capabilities (send, scan, download attachments) to a Qt App

I have a cross platform Qt application i'd like to add e-mail capabilities for. Given that the user grants his/her permission to the application and provides the e-mail/server/password information to the application, i'd like to:
Programmatically send e-mails using that account
Scan the inbox looking for certain e-mails i'd be interested to download (search strings inside subject lines)
Be able to download attachments from e-mails i deem interesting.
Ideally, i'd like to be able to interface to popular e-mail services like GMail, Hotmail, (IMAP) so that my users have an easy configuration (e.g. "I have gmail, here's my ID/password").
Is there any Qt library that can assist in that task?
You may want to take a look at this
make sure that you may need to change some stuff over there, such as:
socket->connectToHost( "smtp.yourserver.com", 25);
for the gmails (for instance) smpt server,etc...

Resources