How to handle authorization code requests in react-native? - react-native

I have a case where server could respond with error if authorization code is required (for example code from Google Authenticator) and I can't find a solution on how to handle that.
Scenario: Request to server > server responds with error > enter code > re-send request with added code in body

If I understand your question correctly, I would do it this way:
Send request to server >
Receive error and open another window, which will contain the text box for the code >
User fills it out and sends it >
Then if it was successful, display a message or navigate to another screen.
If this isn't the answer you are looking for then please specify your question more clearly...

Related

twilio whats app bot select one option from list

i'm doing this whatsApp bot auto response using twilio apis,
i want user to select one option from list as shown in this pics, i check this link :
https://developers.facebook.com/docs/whatsapp/guides/interactive-messages/
it's called List Messages, so i want exactly what is shown in the pics using twilio apis,
as i check this document (Creating templates with buttons) from twilio link : https://www.twilio.com/docs/whatsapp/buttons#additional-information,
i want button shows popup select one option please help, i'm trying my best to ask this question the best i can i hope u understand after editing
click on it then this popup shows
thanks advanced
These messages are called Interactive Messages and according to Meta's docs "users cannot select more than one option at the same time from a list or button message, but they can go back and re-open a previous message."
Please have a look at the Twilio Doc to see which message types are currently supported.

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

Register Instagram API error

Today i try to register my website and take Instagram API but see little changed page:
http://postimg.org/image/g4bssucyd/
there i can't add nothing for ''redirect URI(s)'' like before was,
When i add:
application name
description
website url
enter captcha, click on ''register'' nothing happend,
I ask Instagram support but they not answer, use google but nothing found, anyone here know something about this ?
Thanks.
Well... it seems like a bug. Sometimes it not works. Today (2015-04-15) I was facing a similar issue when registering my Client ID. When I filled up Website URL and Redirect URI with a public URL it just worked. Then I edited and changed to localhost url. So it work for me - although it's a bit weird...
Also, you must click on "Redirect URI(s)" so that show a input text:
And here is after I had changed redirect_uri public url to localhost:
Well, you probably hadn't entered redirect urls, the text input is on the next line after the label "Redirect URI(s)" previously it was a single field, but now it supports multiple redirect urls. But there's really no point in that since Instagram API closed POST and DELETE methods for everyone (except some third party applications) Now you can only register your app with basic scope. Read the new policy they posted earlier:
http://developers.instagram.com/post/116410697261/publishing-guidelines-and-signed-requests

Google Play game sign in failed

I'm making a tutorial to connect to "google play game service" and a pop up still appear mentioning that "failed to sign in. plesae check your network connection and try again"
Everything is setup correctly, SHA1, package name, app_id, and any other related to configuration.
Two strange message appear in the log:
The fist is "You have not specified a View to use as content view for popups. Falling back to the Activity content view which may not work properly in future versions of the API. Use setViewForPopups() to set your content view."
The second is "disconnect() called when client was already disconnected"
is there any possible solution?
Thanks in advance for any help.