Reputation: 5
I want to add the firebase admin sdk: so, I Clicked on the "GENERATE NEWPRIVATE KEY" button I got a .json file which was been downloaded automatically.
Then to add it I got a code-
cred = credentials.Certificate('path/to/serviceAccountKey.json')
Now,the question is, how should I add it to my code,which is in Python?
I tried copy pasting it,but it didn't work. It still gave errors.
And, I don't get why we have to just put in that code as we don't even specify the file that was being downloaded.
Upvotes: 0
Views: 879
Reputation: 915
And, I don't get why we have to just put in that code as we don't even specify the file that was being downloaded.
cred = credentials.Certificate('path/to/serviceAccountKey.json')
Let's say that:
'path/to/serviceAccountKey.json'
is path to file-you-just-downloaded.json
Upvotes: 1