Google翻译问题之——Cloud Translation API has not been used in project x before or it is disabled.
调用翻译接口返回
{error={code=403, message=Cloud Translation API has not been used in project x before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/translate.googleapis.com/overview?project=x then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry., errors=[{reason=accessNotConfigured, extendedHelp=https://console.developers.google.com, domain=usageLimits, message=Cloud Translation API has not been used in project x before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/translate.googleapis.com/overview?project=x then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.}], status=PERMISSION_DENIED}}
x代表是出问题的数字。之前翻译用着一直没问题。突然今天就返回这个信息。因为开发这边没权限打开提示的
https://console.developers.google.com/apis/api/translate.googleapis.com/overview?project=x
实际在有权限的同事打开是这样,重新启用就好。