ios - iOS 应用程序 swift 3 中的谷歌翻译 rest api 错误 403

标签 ios swift swift3 google-cloud-platform google-translate

有人可以帮我解决这个问题吗?

我正在使用 swift 3 开发一个应用程序,我正在尝试将 google translate api 集成到我的 iOS 应用程序中,但其余 api 响应以下错误:

["error": {
code = 403;
errors = (
{
domain = global;
message = "Requests from this ios client application <empty> are blocked.";
reason = forbidden;
}
);
message = "Requests from this ios client application <empty> are blocked.";
status = "PERMISSION_DENIED";
}]

最佳答案

你有没有关注: Implementing google translation api in swift 3 iOS

正如他提到的,您必须正确激活您的帐户并注册,因为它似乎不再是一个免费的 API 可以使用了。

关于ios - iOS 应用程序 swift 3 中的谷歌翻译 rest api 错误 403,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43921916/

相关文章:

ios - 将嵌入 NSAttributedString(通过 NSTextAttachment)的图像视为单个字符,这样它就不会断行?

ios - Swift 3 Xcode 8 中的 FileManager 和 urlsForDirectory 错误

ios - 如何在 Swift 中枚举 ALAssetsGroup

ios - Swift - 如何在 UITableViewCell 中打开另一个带有 CollectionViewCell 的 View Controller

iphone - 更多 iCloud 核心数据同步问题

javascript - 如何在 React Native 中截图测试?

swift - 在 macOS 上使用 Swift 4 检测 USB 设备

ios - 类型 MCSessionState 不符合协议(protocol) 'AnyObject'

swift - Swift3 函数声明中新的 "for"、 "at"、 "in"关键字是什么?

ios - 如何使用 URLSeassion 显示下载进度