0
votes

Generated the token Using this file for authentication. After that, I generated a rest url by reading this document

I hit from my terminal curl "https://sampleproject-763e9.firebaseio.com/USERS.json/?auth=my generated token from above file". For the generation of my token, I used these two things:

  • Enter User ID:userM1
  • My Jason which I got from firebase by going into project settings->serviceaccounts->adminsdk and clicking generate new private key.

I got this error

{ "error" : "Invalid claim 'kid' in auth header: '5e3994c7ce7839ecbe22b9c01e0cc0e1db2593b1' with iat: '1505402027'" }.

This is how my database looks likeMy databse is

These are the rules for my private database.enter image description hereMy output.enter image description here

1

1 Answers

0
votes

This not the way to get authentication to firebase secret database. After generating the token from json you have to generate access token by signing in.