Google Cloud Platform Project-ID wrong format

googlegoogle-cloud-platformgoogle-compute-engine

I`m using Google cloud platform and now I want to use the API. I used the option on their website to try API-Calls but everytime i give in my Project-ID it get this as a response

{
 "error": {
  "errors": [
   {
    "domain": "global",
    "reason": "invalidParameter",
    "message": "Invalid value ' <myProject-id>'. Values must match the following regular expression: '(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))'",
    "locationType": "parameter",
    "location": "project"
   }
  ],
  "code": 400,
  "message": "Invalid value ' <myProject-id>'. Values must match the following regular expression: '(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))'"
 }
}

I got my Project-ID by going to my project settings en there I saw Project-id: so I used that ID, is this the wrong ID maybe?

project-id

Best Answer

I just tried the API call using the article and it worked fine. I also tested the call using the project number and it worked. Your project ID and project number can be obtained from the Dashboard as explained in this link. I would suggest trying using an incognito window. If that does not work try with the project number. Your browser might be parsing wrongly some of the characters of your project ID.

Related Topic