26

Is it possible to create new hosting projects by API, or another non-interactive method on Google Firebase?

I already tried Firebase tools with a token, but it says that it is only possible to create a new project on Firebase Console.

Some context: My project allows users to create static websites online and we are searching for solutions to host these sites. Firebase would be a great solution, but only if I could integrate the user's new project into my system, with Firebase projects.

Steven Jeuris
  • 18,274
  • 9
  • 70
  • 161
Roger Russel
  • 749
  • 7
  • 17
  • did you succeed? Firebase now allows you to add itself to a GCP project, but it has a small limit on the number of projects – dowi Jun 14 '20 at 19:31

2 Answers2

27

Updated (2018-11-07)

It is now possible to create with the Firebase Management API. Through this same API you can get a list of projects, add an app to an existing project, and list the apps in a project.

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
  • 2
    Do you know if it doesn't have one API, because it is not done yet, or if is there a reason to don't have one? – Roger Russel Jun 14 '16 at 15:29
  • -- "... currently ..." – DavidTaubmann Jun 14 '16 at 21:39
  • 4
    It's really too bad that Firebase doesn't have this in their public API, it seems vital because I have the need to spin up blank databases for automated CI and testing. I had been using https://github.com/casetext/firebase-admin but that seemed to have stopped working – TownWizard Aug 12 '16 at 19:09
  • 1
    Totally agree! In my case, I have to put people to create it manually. – Roger Russel Aug 16 '16 at 16:21
  • hii @Frank van Puffelen, i also need to create Firebase project by Api. you answered before an year ago,then now after an year is this solved or not. Api available or not? – aj0822ArpitJoshi Dec 19 '17 at 11:37
  • 2
    The situation is still the same. I know that some work has been done on creating an API for this, but there is no timeline on when (of even if) that may become available. – Frank van Puffelen Dec 19 '17 at 14:04
  • Is this possible using something like Admin sdk instead of over a restful api? – Scorb Nov 13 '20 at 23:43
1
  • Hi!

    public static void AddFirebase()
     {
         var request = new AddFirebaseRequest();
         var operationFirebase1 = _firebaseManagementService.Projects.AddFirebase(request,
             "projects/" + CloudManager.ProjectId).Execute();
         WaitOperation(operationFirebase1, "Firebase");
    
     }
    

My sample creating a new Firebase project by API:https://github.com/Denys2211/Firebase-cloud-messaging