'How to properly set POST query in Postman to Firebase

my url: https://"url"/services.json?auth="auth_key"

trying to set POST query using Postman with form-data:

example

getting error: "error": "Invalid data; couldn't parse JSON object, array, or value."



Solution 1:[1]

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.

Solution 2:[2]

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

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Frank van Puffelen
Solution 2 sarfaraj shah