The Database Hub is home for developers who want to clone, connect, and share databases and build apps together. Cloning a database allows you to copy it to your account and give a great start to your project.
in the website and on my client, when I try to get the cities I get an error. in your website it says: "It was not possible to load the output: Something wrong happened in our side. Please try again later." all the time at the end and on the client I just get an error like that: {"error":"unauthorized"}
Could you please share the query that you are trying to execute?
this is the code the website generated for me: (I'm trying to get the cities from the database)
(new Thread(new Runnable() { @Override public void run() { try { URL url = new URL("https://parseapi.back4app.com/classes/Continentscountriescities_City/CityList?keys=name"); HttpURLConnection urlConnection = (HttpURLConnection)url.openConnection(); urlConnection.setRequestProperty("X-Parse-Application-Id", "0saXVLkePf7VXrftKvcAwqeffeNbxHUAA1eBbOh7"); // This is your app's application id urlConnection.setRequestProperty("X-Parse-REST-API-Key", "RHresVbGu9orrnXhwhTqjPmRCWfIVKGiOP8i5jIi"); // This is your app's REST API key try { BufferedReader reader = new BufferedReader(new InputStreamReader(urlConnection.getInputStream())); StringBuilder stringBuilder = new StringBuilder(); String line; while ((line = reader.readLine()) != null) { stringBuilder.append(line); } JSONObject data = new JSONObject(stringBuilder.toString()); // Here you have the data that you need Log.d("MainActivity", data.toString(2)); } finally { urlConnection.disconnect(); } } catch (Exception e) { Log.e("MainActivity", e.toString()); } } })).start();
Where you see https://parseapi.back4app.com/classes/Continentscountriescities_City/CityList?keys=name
could you please try to change to https://parseapi.back4app.com/classes/Continentscountriescities_City?keys=name
? It is strange it is generating for you with CityList at the end. Could you please double check and confirm?
Also... I recommend you to generate a new rest key for your app (you can do that under Dashboard -> Server Settings -> Core Settings) since you made it public.
We use cookies to provide our services and for analytics and marketing. To find out more about our use of cookies, please see our Terms of Service and Privacy Policy . By continuing to browse our website, you agree to our use of cookies.