WhatsApp Token Generation - token

I wanna experiment WhatsApp messaging implementation but I am stuck with token generation part. After surfing various platforms I found that
Token = MessageDigest of (
"PdA2DJyKoUrwLw1Bg6EIhzh502dF9noR9uFCllGk" // A constant
+ $Timestamp // WhatsApp build release time
+ $Phone_Number // Client Mobile number
)
But unfortunately, I couldn't find the timestamp for every WhatsApp version that I use to login.
It would be great if anyone can tell me the way to find / calculate the timestamp of a particular WhatsApp version. Or, is there any other ways to generate the Token ?
P.S : I have checked my code with some old WhatsApp versions and its timestamps which I got from GitHub WhatsApp repositories and its working fine upto login. I want to login with the latest WhatsApp version but unable to get its timestamp.

Related

Xamarin forms how to log in with Apple account

I'm trying to publish my first xamarin forms app on IOS. I barred the issue of login with the Apple account.
I have 4 questions, please.
1- If I implement Sign in with Apple only for IOS 13+ will it be accepted? :(
2- I'm trying to use Xamarin Essentials to log in to IOS 13+ as shown in this article:
Xamarin Essentials
// Use Native Apple Sign In API's
r = await AppleSignInAuthenticator.AuthenticateAsync();
But I only get back the idToken. AccessToken, name and mail return null. Am I missing something?
3 - And finally I tried to use the plugin.firebaseAuth version 4.0.0-pre01:
Link plugin
// For iOS
var credential = CrossFirebaseAuth.Current.OAuthProvider.GetCredential("apple.com", idToken, rawNonce: rawNonce);
var result = await CrossFirebaseAuth.Current.Instance.SignInWithCredentialAsync(credential);
// For Android
var provider = new OAuthProvider("apple.com");
var result = await CrossFirebaseAuth.Current.Instance.SignInWithProviderAsync(provider);
It provides an example using prism to deal with this, but when I install the plugin in this version the application is no more than a splash screen and closes, without showing an error in the output. What am I doing wrong? :(
The first link seems promising for iOS less than 13 and Android using Asp.NET. However in the application I use only the Firebase ClouFirestone and Firebase Hosting for the Administrative Panel. Is it possible for me to sign in Apple without the services of a different backend?
I am very grateful for any light on the path I must follow
1- If I implement Sign in with Apple only for IOS 13+ will it be accepted?
It depends, if they don't find any other issues or violation, it will get accepted.
2- I'm trying to use Xamarin Essentials to log in to IOS 13+ as shown in this article: But I only get back the idToken.
Apple will only provide you the requested details on the first authentication. After that first authentication, you will only get the User Id so be sure to store the details that first time in case you need them.
This feature needs to be tested on a physical device running iOS 13. The simulator is not reliable, it doesn’t always work properly.
Should follow the design guidelines when implementing Apple Sign In. You can find it here: https://developer.apple.com/design/human-interface-guidelines/sign-in-with-apple/overview/

How can I best manually reply to texts from a Twilio phone number?

I'm a bit fed up with other phone providers and would like to have a more programmable, configurable, personal phone number (I miss GrandCentral). Google Voice is good, but I want to build something better. Twilio is great! I'm considering porting my personal phone number to Twilio.
I already have phone routing TwiML figured out, but where I'm stuck is text messaging. I can't just forward text messages to my burner phone/smart phone, because for replies to be natural, I need to be able to reply and have it get routed back to the sender. Google Voice handles this by forwarding every incoming forwarded text from a unique number so replies go to the right place, but I think this would get expensive quick with Twilio.
Is there a simple app or gateway that someone somewhere has already built (Twilio themselves perhaps) that lets me reply to texts to a Twilio phone number? It could be a web app, mobile app, WhatsApp gateway, whatever.
I looked into Twilio Programmable SMS/Chat, which definitely seems like the right building blocks, but also seems like to solve this I'd be building a web/mobile app and a backend service to manage my texts. Surely something already exists for manual text response to Twilio numbers.
I looked into Twilio Flex (and other customer management/agent center solutions) and that could work! But it seems overkill and I couldn't find a way to do Twilio Flex agent responses (e.g., reply to my family) on my smart phone. Is there a Twilio Flex mobile app? Is there something less overkill? I thought for sure I'd find something in the Twilio dashboard that would let me manually reply to texts.
Just looking for the most basic SMS/MMS inbox with reply functionality for a Twilio phone number I can find without having to build too much. Thanks!
FrontApp is another paid service that supports a Twilio integration for SMS messaging. There isn’t exactly a huge base of people using Twilio for individual purposes, so I don’t think it’s that surprising that what you’re looking for doesn’t already exist (though I agree it would be cool if it did).
Potentially, you could also look into the Twilio CLI utility as a way to interact with the API without so much developer overhead. Perhaps your new SMS interface is just going to be an SSH client on your phone connected to a box with the Twilio CLI installed?
An easy way to use your number for free (besides Twilio's costs) is to use a Google Spreadsheet with a script attached.
Here is a basic template you could start from and adjust accordingly.
STEP 1. Create New Google Spreadsheet.
STEP 2. Label columns A-E Date, From, Incoming Message, Reply, Status.
STEP 3. Open script editor and clear contents and paste code below.
STEP 4. Edit script by inserting your TWILIO_ACCOUNT_SID, TWILIO_AUTH_TOKEN, (can be found in your Twilio dashboard) TWILIO PHONE NUMBER.
STEP 5. Deploy your script as a web app MAKE SURE to set the "who has access to the app" to "anyone, even anonymous" (Twilio will only work with public URLs).
STEP 6. After deployed copy the web app URL supplied by google.
STEP 7. Go to your Twilio phone numbers and paste the URL as the webhook for when a message comes in, MAKE SURE you change it to HTTP GET.
NOTE: make sure to authorize the script, by running the function from script editor.
function doGet(e) {
var body = e.parameter.Body;
var from = e.parameter.From;
var time = new Date();
var ss = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet()
ss.appendRow([time,from,body]);
}
function onOpen() {
var ui = SpreadsheetApp.getUi();
ui.createMenu('Reply')
.addItem('Send Reply', 'sendText').addToUi();
}
function sendText(){
var ss = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
var range = ss.getActiveRange();
var message = range.getValue();
var getNumber = ss.getRange(range.getRow(), 2).getValue();
var number = '+' + getNumber;
var messagesUrl = "https://api.twilio.com/2010-04-01/Accounts/PASTE_YOUR_TWILIO_ACCOUNT_SID_HERE/Messages.json";
var payload = {
"To": number,
"From" : "PASTE_YOUR_TWILIO_PHONE_NUMBER_HERE", //make sure its formated as +15556667777
"Body" : message,
};
var options = {
"method" : "post",
"payload" : payload
};
options.headers = {
"Authorization" : "Basic " + Utilities.base64Encode("PASTE_YOUR_TWILIO_ACCOUNT_SID_HERE:PASTE_YOUR_TWILIO_AUTH_TOKEN_HERE")
};
UrlFetchApp.fetch(messagesUrl, options);
return ss.getRange(range.getRow(), 5).setValue('Sent');
}
To use it type a reply in the row you want to respond to make sure any cell in that row is selected, then go to the "Reply" tab and click "send text"
Here is a free android app you can download from the google play store. It was created by a Twilio employee, and offers what you were looking for. It does have some limitations which you can read in the description.
https://play.google.com/store/apps/details?id=com.tigerfarmpress.owlsms

iPhone development - Viber integration

Somebody knows how to send a message through Viber inside my app?
I've been trying send:
viber://[local] (ex. viber://63648018)
viber://[domestic] (ex. viber://08963648018)
viber://[international] (ex. viber://+498963648018)
with no success.
Any idea?
Unfortunately there's no such option available in Viber since version 5.6, according Viber's support.
You can share a message, using Viber, but you can not send it to a specific user: you'll be prompted to select one in you user's list.
The URL scheme is:
viber://forward?text=foo

App with custom URL callback and custom search URL

I'm looking for recommendations for an iOS barcode scanner app. Specifically for iPad which will support a custom URL callback to enable the app to be launched from a web browser.
Additionally, it needs to support and a custom search URL which will send the user back to the website once the barcode has been decoded into a URN (SKU).
I have discovered ZBar which is an excellent app, unfortunately it doesn't support custom URL callback and it's designed for the iPhone.
Another app pic2shop PRO seems to tick these boxes, but it's relatively expensive at £10.49 and the setup will require somewhere in the region of 200 installs.
I did a similar project using the free version of pic2shop . The thing is that the free version can read only these types of barcodes : UPC-A, UPC-E, EAN-13, EAN-8 , according to the documentation of the app.
Pic2shop is a free barcode scanner app available for iOS® and Android®. It reads UPC-A, UPC-E, EAN-13, EAN-8 and QR codes. The app also display comparison shopping results for UPC and EAN.
From my personal experience, I can say that it scans and decodes the barcode very fast and very accurate.
In my project the app is launched from a webpage, it works for both android and ios. In order to get it working you have to invoke the pic2shop app from a url and then set your callback address. You will find the decoded barcode data as a value to a parameter in the callback url. To help you more, you can get those values using this javascript function found here.
For example:
<input type=button OnClick="scan();" value="Scan Barcode">
<script>
function scan(){
window.location="pic2shop://scan?callback=http://yourwebsiteurl.com/index.html?barcode=ean"
}
</script>
As soon as the item is successfully scanned it will redirect you to the callback url with the actual barcode number as a value to a parameter. For example http://yourwebsiteurl.com/index.html?barcode=5123548745123. I already told you how to get the value of a url parameter with javascript.
PDF417.mobi Pro barcode scanner app supports that use case.
Note: I'm a developer on that project.
Basically, the app can be launched from any other app, including a web application, when url in the form: pdf417://scan?type=PDF417,UPCA&callback=myscheme://myaction is launched.
The app then scans the barcode, in multiple formats, (PDF417 and UPCA in this example), until the result is obtained.
Then, the app opens the URL myscheme://myaction. In your case, this can be your web service, http://www.somemyscanner.com/service.
Specifically, it will open the URL using format: http://www.somemyscanner.com/service?data=[data]&type=[type].
You can then use those parameters to implement your desired functionalities.
I tried the PDF417 app and it is EXTREMELY expensive (for an app - $28) and does not work. I bought it anyway because I am trying to solve the same issue and I can tell you it is not the solution for general barcode scanning.
It might work with pdf417 barcodes, but those are few and far between and I haven't been able to get it to work. I definately does not support any standard barcode formats. It also has no settings panel (in settings) and the tap target in the app that should be settings just take you to the company web site.
I am still testing other apps but haven't found any app that does what you ask, Red Laser used to but it no longer has that functionality.

Microsoft Live SDK OneDrive ios multiaccounting

If you have experience working with Microsoft OneDrive (ex SkyDrive) using their official live-sdk - have you faced a problem of multi-accounting?
Just on MS forum I found this post (And so I do want to make the same task):
"I'm working on an IOS app using one drive sdk and i need to do a multi connection so user can add more than one account , and then when he click on the account icon i account will be opened , so my idea to do this was to save the accessToken ,authenticationToken,refreshToken,scopes,expires of each account then i will create the LiveConnectSession object using the method :
initWithAccessToken:(NSString *)accessToken
authenticationToken:(NSString *)authenticationToken
refreshToken:(NSString *)refreshToken
scopes:(NSArray *)scopes
expires:(NSDate *)expires;
then i will set it to the LiveConnectClient , but the broblem is that the session proprety of LiveConnectClient is read only so i cant change it "
So the MS support tells, that right now it is impossible, but still there are apps, that provide multiaccounting
So now I'm confused.
I will be happy to hear any response.

Resources