WhatsApp API (send phone) - whatsapp

Suppose that the site has a phone number and a "Whatsapp" button, which contains a link https://wa.me/phone number, when clicked, a new tab opens in the browser and the link is converted to https://api.whatsapp.com / send /? phone =% 2Bphonenumber & text & app_absent = 0, then a chat with a number in the desktop application opens. But sometimes WhatsApp returns 429 error, allegedly the number of requests has been exceeded. Although the requests leave no more than 10, with an interval of 1-2 minutes. Is this interval not enough?

Same problem here, fixed with whatsapp://send/?phone= ....

Related

Calling getAttachmentContentAsync on an email left open for more than 5 minutes results in a 401 error

Steps to reproduce:
1. Open Add-in on an email item with attachments (OWA against O365 on Chrome)
2. Wait > 5 or so minutes
3. Attempt to download attachment content using getAttachmentContentAsync
4. Observe callback with generic error
Looking at outbound XHR's in dev console. I see a GET to this url below
https://attachments.office.net/owa/jules.wada#sfdcmsft.com/service.svc/s/GetFileAttachment?id={attachmentId}&token={attachmentDownloadToken}&isDownload=true&animation=true&asDataUri=true
This requests 302's with a redirect url of (It looks like office.js is attempting to refresh the attachmentDownloadToken)
https://outlook.office.com/owa/jules.wada#sfdcmsft.com/service.svc/s/GetAttachmentDownloadToken?redirect={encodedRedirectParams}
which then returns a 401. Is this behavior expected?
Switching between emails refreshes the attachmentDownloadToken, but getAttachmentContentAsync does not seem to do so.

Open specific conversation on whatsapp from ionic 4

I have tried to call whatsapp from InAppBrowser plugin by passing url "https://api.whatsapp.com/send?phone=+91123456890&text=test".
I have also added config.xml changes as suggested
(access launch-external="yes" origin="whatsapp:*" /)
It opens the browser (when I run this on device) with send button on it to send the message to Whatsapp.
But I am unable to tap the Send button. It is not redirecting me to whatsapp application with given number.
Please can you show me some sample code or the way to achieve this.
Thanks,
i also face this problem. following code fixed my problem
window.open('whatsapp://send?phone=923130601266', '_system');
You should try to call below api in InAppBrowser.
The direct conversation will open with the number you set below the link.
Don't forget to add country code before number.
https://wa.me/your-mobile-number

Web POS cancel results in undefined URL

I have build a web application which runs in the browser on an Android device. The URL to launch the square POS app is as follows:
intent:#Intent;action=com.squareup.pos.action.CHARGE;package=com.squareup;S.com.squareup.pos.WEB_CALLBACK_URI="+callbackUrl+";S.com.squareup.pos.CLIENT_ID="+clientId+";S.com.squareup.pos.API_VERSION=v2.0;i.com.squareup.pos.TOTAL_AMOUNT=100;S.com.squareup.pos.CURRENCY_CODE=AUD;S.com.squareup.pos.TENDER_TYPES=com.squareup.pos.TENDER_CARD;S.com.squareup.pos.NOTE="+orderId+";S.com.squareup.pos.REQUEST_METADATA="+orderId+";l.com.squareup.pos.AUTO_RETURN_TIMEOUT_MS=3200;end
The square POS app launches as expected. I can process a payment through the POS app and upon a successful transaction it switches to the browser and loads the callback url. This is all working well.
However, if I click on the link above to open the square POS app and then hit the cancel [x] button in the square POS app it bumps back to the browser and then reloads the URL with an undefined parameter.
E.g. the original URL is https://localhost:1337/admin/#/order/pay/f2kw0oFYNG
Then I launch the square POS app via the intent url. When if I hit cancel in the square POS app, when it switches to the browser it loads:
https://localhost:1337/admin/#/order/pay/undefined
Although you answered it yourself in the comments, it looks like the issues was the result of having a cached version of your link being used.
Just for clarity for anyone coming across this:
The callback URL should always be called at the end of the transaction.
For example: A cancelled transaction would return http://URL/PATH?com.squareup.pos.ERROR_CODE=com.squareup.pos.ERROR_TRANSACTION_CANCELED&com.squareup.pos.ERROR_DESCRIPTION=The%20transaction%20was%20canceled if the merchant had cancelled the transaction.

Opening a WhatsApp chat from a website in IOS & Android

Is it possible to open a chat with a given phone number in WhatsApp from an website on IOS & Android? If so, how?
Have you tried creating a link like so?
https://api.whatsapp.com/send?text=Check%20this%20out
The text parameter lets you pre-fill the chat box with some .. text : - )
As far as I know, you may also specify the recipient's number like so
https://api.whatsapp.com/send?phone=4917241077
Just make sure you add the country code properly (49 would be Germany in this case)
Of course, you may combine parameters. I gave this a quick test yesterday since I need it for a project of mine and accessing this link on desktop opens the WhatsApp web chat. Doing so on a mobile phone opens the app.
It seems like this is not possible from within websites. Time to rest my case.
Nowadays it is explained here on their website:
Use https://wa.me/{number} where the {number} is a full phone number in international format. Omit any brackets, dashes, plus signs, and leading zeros when adding the phone number in international format.

Updating application icon Badge in iPhone 3.0, when application is not running

I have an application, which lists number of IM sent by any of my friend using my application. And application icon show number of unread IMs to me. If my application is running in foreground, I can update badge by calling web service every 1 minute which will return number of unread IMs. Suppose, if the person is using iPhone3.0 and application is not running, how can i update the badge? Push notification without alert, but with just number of unread IMs as badge number will work?
Please advice, Thank you.
Yes if the user enables push notifications and allowes it for your app then you can use them to just adjust the badge counter.
At last, we found the problem, the problem is passing badge parameter as string in JSON payload, Now we are sending it as number, so even when the application is in background, badge getting set properly.
Thank you for your all help.