[英]Google Vision API Requests from IP address … are blocked
我使用Google Vision OCR使用PHP語言從圖像中獲取文本。 當我使用了很長時間。 我收到以下錯誤:
array(1) {
["error"]=>
array(4) {
["code"]=>
int(403)
["message"]=>
string(53) "Requests from IP address ..... are blocked."
["status"]=>
string(17) "PERMISSION_DENIED"
["details"]=>
array(1) {
[0]=>
array(2) {
["@type"]=>
string(35) "type.googleapis.com/google.rpc.Help"
["links"]=>
array(1) {
[0]=>
array(2) {
["description"]=>
string(32) "Google developer console API key"
["url"]=>
string(75) "https://console.developers.google.com/project/191619933224/apiui/credential"
}
}
}
}
}
}
請告訴我原因以及解決方法。 非常感謝。
檢查您是否已經在Cloud API控制台中授權了API,並按照示例文檔中的說明配置了PHP客戶端。
具體來說,在運行示例之前,請確保下載與您的視覺API項目相關聯的credentials.json
文件,並將GOOGLE_APPLICATION_CREDENTIALS
環境變量設置為憑據路徑。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.