React Native Google Places API restriction issue - react-native

I get the following error while using React Native Google Places autocomplete.
This IP, site or mobile application is not authorized to use this API
key...
I'm using a Google Places API Web Service key, which restrictions on Android-App.
This one is restricted with the package name com.xxx.xxx.debug and com.xxx.xxx.test. Another API key is restricted to com.xxx.xxx.
I've added the proper SHA-1 key.
Anyone has a clue what I'am doing wrong or why it doesn't work?
I've checked the docs of Google and tried out many different things, still I cannot get it to work with a restriction.

Add your React-Native android package id to the key you are using for Google Places API. You can find it in Project(Root Folder) => android => app => build.gradle => application id

Related

Google API key is not working in release/ debug API, working on local machine in react native

configured all the things for place API to use google autocomplete
after that linked billing account in google cloud
Google API key is not working in release/ debug API, working on local machine in react native
Need to show list of items

How to generate a reCAPTCHA site key for React Native app

I'm trying to add reCAPTCHA to my react native app. I'm using GCP's React Enterprise, but their docs specify website, iOS app, or android app for the key's platform type. Will the site key for an iOS or android app work in my React Native app? If not, how would I generate the site key that works with React Native?
According to my research, React Native is well integrated when it comes to Google Recaptcha. I think your question is more related to the mobile apps than the integration of both services.
Will the site key for an iOS or android app work in my React Native app?
That depends on the type of key that you choose to use, reCAPTCHA Enterprise provides score-based (no challenge) and checkbox (checkbox challenge) site keys to verify user interactions on your web pages and mobile applications. Both key types return a score for each request, which is based on interactions with your site or application. This score lets you understand the level of risk that the interaction poses and helps you to take appropriate actions for your site or application.
If you use the Score-based site key (recommended), it will be supported by websites and mobile platforms, unlike the Checkbox site key, which only supports websites. Link
How would I generate the site key that works with React Native?
In the official documentation, they have a tutorial about Create site keys for mobile applications, and they mention that you can create only score-based site keys for mobile applications.
This is the link.

React Native Expo AuthSession; Google Authentication

I’m trying to setup the Google authentication using AuthSession in Expo documentation (without Firebase)
https://docs.expo.dev/guides/authentication/#google
The first problem is, that the slack example doesn’t work: on the devices and simulators nothing happen after pushing the button, and in web mode it returns an error
Error 401: invalid_client
The OAuth client was not found.
What I’ve done using steps in documentation:
I’m not sure if it’s necessary, but I’ve installed yarn add expo-application
I’ve registered in Credentials page (Google Cloud Platform)
Logged in using expo login, in the terminal where I was starting expo start
Created a new Google Client ID that will be used with expoClientId
(Image) New Google Client ID setting image
( I'm not allowed to input images now )
(Don’t know if it’s necessary) I’ve created a project in https://expo.dev/ and then published the project using dashboard of expo start
(Image) Setting for "publish" in expo start dashboard
Where:
“expo”: {
“name”: “rn-my-project”,
“slug”: “rn-my-project”,
“version”: “1.0.0”,
“orientation”: “portrait”,
…
}
Using the code in the example, provided in documentation for Google, I receive null as response.
As I understand, this should be enough to test the Google Authentication using AuthSession in Expo Go app. I also made iosClientId, androidClientId and webClientId, but I’m not sure if I made everything correct.
Will be glad for any help, because I couldn’t find any person with the problem as mine.
Yours sincerely.
P.S. I've successfully set up logInAsync for Google using this documentation, but it's written, that it is deprecated.

Instagram private API in React native using Expo cli

Can anyone link any documents on using Instagram private API or Instagram web API with react native Expo Cli. I read about it and didn't find a way to do it due to the need for native code. However, I am unable to use XCode for several reasons.
Does anyone have a way to integrate or is anyone able to find any documents about using mentioned APIs (or modules however you want to call them) with Expo (problem lies mainly on the nodejs-mobile-react-native module as far as I have understood). Or is anyone able to link another framework with the capabilities of building Android and iOS applications with the same code or am I asking for impossibilities? I have tried flutter with flutter_insta but it has the limitation of getting only public account data etc.
Any help will be appreciated!

How to get google WEB API key to using in Expo sdk 32?

I'm going to make Google login with Expo sdk 32, But In documentation, There is no how to get WEB API Key to use option 'cliendID' at LoginConfig.
How to get google WEB API key to using in Expo sdk 32?
Hi I faced the same issue because it`s not so obvious what to use from the Expo docs, here it is
NOTICE: if you want to make it work with the standalone build, you need to set up REVERSE_CLIENT_ID in the app.json from GoogleService-info.plist
the instruction you can find here: point 5 https://docs.expo.io/versions/latest/sdk/google-sign-in/#setup