my url: https://"url"/services.json?auth="auth_key"
trying to set POST query using Postman with form-data:
getting error: "error": "Invalid data; couldn't parse JSON object, array, or value."
CodePudding user response:
if you are trying to do firebase authentication then firebase gives methods for it to make your work easy and simple and you don't have to call api.
your image is blury i can't see what actually there is???
Firebsae Auth Official Doc: https://firebase.google.com/docs/auth
CodePudding user response:
The REST API of the Firebase Realtime Database expects the data to write to the database to be present in the body of the request as a JSON object, not in the HTTP parameters to that request, nor as form-encoded values in the body of the request.
For example, here's the first request from the Firebase documentation on writing data with the REST API:
curl -X PUT -d '{
"alanisawesome": {
"name": "Alan Turing",
"birthday": "June 23, 1912"
}
}' 'https://docs-examples.firebaseio.com/fireblog/users.json'
So the body of the request here is a JSON object, and this command writes a node alanisawesome
under the /fireblog/users
path in the database.
You will have to build a request that looks similar, but then with your data and database URL.