Video Intelligence API - анализ меток (с использованием Node.js)

Я следую официальной документации API Video Intelligence для анализа видео на наличие ярлыков (используя node.js). Это ссылка на код.

Но я получаю следующую ошибку:

ОШИБКА: {Ошибка: 7 PERMISSION_DENIED: вызывающая сторона не имеет разрешения при новом createStatusError (/home/pi/node_modules/grpc/src/client.js:64:15) в /home/pi/node_modules/grpc/src/client.js:583:15 код: 7, метаданные: метаданные { _internal_repr: {} }, подробности: "У вызывающего абонента нет разрешения", примечание: "Возникла исключительная ситуация в методе повтора, который не был классифицирован как временный"}

GOOGLE_APPLICATION_CREDENTIALS указывает на файл ключа учетной записи моей службы.

Я использовал следующую команду, чтобы установить эту переменную

$ export GOOGLE_APPLICATION_CREDENTIALS=<path_to_service_account_file>

Теперь я получаю следующую ошибку

ERROR: { Error: 7 PERMISSION_DENIED: Cloud Video Intelligence API has not been used in project usable-auth-library before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/videointelligence.googleapis.com/overview?project=usable-auth-library then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.
    at new createStatusError (/home/pi/node_modules/grpc/src/client.js:64:15)
    at /home/pi/node_modules/grpc/src/client.js:583:15
  code: 7,
  metadata: 
   Metadata {
     _internal_repr: 
      { 'google.rpc.help-bin': [Array],
        'grpc-status-details-bin': [Array] } },
  details: 'Cloud Video Intelligence API has not been used in project usable-auth-library before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/videointelligence.googleapis.com/overview?project=usable-auth-library then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.',
  note: 'Exception occurred in retry method that was not classified as transient' }

0 ответов

Другие вопросы по тегам