google-static-maps - 对 google static api 进行任何请求时得到 403
问题描述
我有以下代码:
String url = "https://maps.googleapis.com/maps/api/staticmap?center=40.714728,-73.998672&zoom=12&size=400x400&key=<MyApiKey";
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url(url)
.get()
.build();
Call call = client.newCall(request);
Response response = call.execute();
System.out.println(response.code());
我已经用我的实际 API 密钥替换了我的密钥。谷歌指标识别请求。但它们都是错误的,我确实有权发出命令
解决方案
推荐阅读
- javascript - 从另一个 Stencil JS 库导入 Stencil JS 库
- javascript - 如何在 TypeScript 中使用“then”?
- scala - 在 Spark 中拆分列并将空值转换为 null
- python - SQL 初学者 - SQLite 与 INTERVAL
- r - R 特征的测量单位
- python - VS Code 未显示有用的 Python 代码片段
- python - 使用 conda 导入 pandas 时出现问题:没有名为 pandas 的模块
- react-native - 我正在尝试在 stack.screen 中传递参数但出现错误
- github - 我的存储库列表中的其他人存储库
- javascript - 单击不同的容器时播放相同的抽奖动画