Arnoldas Bendoraitis
Arnoldas Bendoraitis

Reputation: 1065

API project is lacking Project ID in Google Developers Console

enter image description here

As you can see one of my projects in Google Developers Console is lacking the Project ID. It has Project Name specified though. (My Project was created for testing purposes only). "API Project" is used for Google Maps v2 Android API in my Android application. My questions are:

  1. Is it possible to somehow give that ID to the project?
  2. I want to use the Google Cloud Messaging API in the exactly same application I am developing under "API Project". Shoud I create another Project for that? (Not sure if single Android project can acess various API's through diferent Developers Console projects)
  3. IF it is not possible to have several projects here, should I be worried about he missing ID? (Note: as I mentioned above Project Number is present, although in many tutorials it is referred also as Project ID). I am worried after reading several threads about Error connecting to Google Cloud Storage: 'missing project id' because I am not sure which one ID is being mentioned.

Upvotes: 4

Views: 7649

Answers (4)

Praneesh
Praneesh

Reputation: 373

New developer console does not show the project number on the dashboard. I could not find it though - probably the documentation on Google Developer Console is a bit old.

Instead I could find it by going to the Notifications section. Once can access this by clicking on the "bell" icon on top right hand corner of the console.

Upon redirection to "Activity" page, you can find the Create Project activity in the list. Clicking on the list item would reveal the information about the project. "Project number" is one of the fields in those details.

Upvotes: 1

Arnoldas Bendoraitis
Arnoldas Bendoraitis

Reputation: 1065

Thank you for your answers as they helped me a lot in doing further research and I have the exact answers to my questions now:

Is it possible to somehow give that ID to the project?

Yes, it is. The project ID is an optional identifier that you can assign to your own project. Sometimes it happens to be missing in an older projects that were not created manually. This ID is used by services like Google Cloud SQL when they need access to your project's resources. You don't need to assign your project an ID until you enable one of the services that requires an ID. To register an ID if your project doesn't already have one:

  1. Open the registration dialog box. There are two options for doing this. You can enable a service in the Services pane that requires a project ID. (There's no way to tell ahead of time whether a given service requires a project ID; if you enable a service and it requires an ID, then the dialog appears.) Second option: in the Overview pane, find the Project ID line, and click the Register link.
  2. Enter a new project ID into the text box. For details on what characters are allowed in the ID, see the description below the text box.
  3. A project ID must be unique within your domain. To make sure the ID you've entered isn't already in use, click the "Check availability" button. If an error message appears saying that the ID isn't available, then pick a new one.
  4. When you've entered an available ID, click the "Choose this ID" button.

I want to use the Google Cloud Messaging API in the exactly same application I am developing under "API Project". Shoud I create another Project for that? (Not sure if single Android project can acess various API's through diferent Developers Console projects)

The answer to this question was provided by an answer above:

You can use one project to manage all of your applications, or you can create a different project for each one. In deciding whether to create a new project, consider whether you're collaborating with a different set of people, want to track usage differently, or would set different traffic controls for each application. If so, segregating applications by project in the Console might make sense. You can create as many projects as you need, but please remember that you cannot use multiple projects to try to exceed the limits for API usage by your application.

So if by chance it is possible technically, to do so is not recomended practice.

If it is not possible to have several projects here, should I be worried about the missing ID? (Note: as I mentioned above Project Number is present, although in many tutorials it is referred also as Project ID). I am worried after reading several threads about Error connecting to Google Cloud Storage: 'missing project id' because I am not sure which one ID is being mentioned.

While using Google Cloud Messaging API there should be no problems if the project ID is missing. It is only needed by specific APIs (for example, Google Cloud SQL, as mentioned above) and in that case once you are enabling the usage of those APIs in your project, the popped up dialog window forces to create it manually.

Upvotes: 3

Eran
Eran

Reputation: 393936

You don't need the project ID for Google Cloud Messaging. The project number is the identifier that you use in order to register a device to GCM.

Once the project has been created, a page appears that displays your project ID and project number. For example, Project Number: 670330094152. Copy down your project number. You will use it later on as the GCM sender ID.

Upvotes: 2

Vinicius Braz Pinto
Vinicius Braz Pinto

Reputation: 8289

How did you create the project with the project ID being a required field? As you said, the Project ID required by some of the APIs is actually the Project Number, so I think you're ok, but if you're just starting I would create a new one just to be safe.

As for whether or not create another project, from here:

You can use one project to manage all of your applications, or you can create a different project for each one. In deciding whether to create a new project, consider whether you're collaborating with a different set of people, want to track usage differently, or would set different traffic controls for each application. If so, segregating applications by project in the Console might make sense. You can create as many projects as you need, but please remember that you cannot use multiple projects to try to exceed the limits for API usage by your application.

Upvotes: 1

Related Questions