2
ERROR
Fatal error: Uncaught exception 'Google\Cloud\Exception\ServiceException' with message
{
"error": {
"errors": [
{
"domain": "global",
"reason": "forbidden",
"message": "The bucket you tried to create is a domain name owned by another user."
}
],
"code": 403,
"message": "The bucket you tried to create is a domain name owned by another user."
}
}
Я получаю эту ошибку, когда я пытаюсь создать ведро с доменом с помощью API. I может, однако, создать тот же самый ковш в визуальном интерфейсе приборной панели в консоли.Невозможно создать ведро с доменом с помощью API, но разрешен в консоли
Кто-нибудь знает, почему это может случиться? Инструменты проверки веб-мастеров, домен указан как проверенный.
putenv('GOOGLE_APPLICATION_CREDENTIALS=../../service-account.json');
# Your Google Cloud Platform project ID
$projectId = 'PROJECT';
# Instantiates a client
$storage = new StorageClient([
'projectId' => $projectId
]);
# The name for the new bucket
$bucketName = 'somethingsomething123.domain.co';
# Creates the new bucket
$bucket = $storage->createBucket($bucketName);
echo 'Bucket ' . $bucket->name() . ' created.';