首页 > 解决方案 > Google API 调用:“此 URL 不支持 HTTP 方法 PUT。” URL 可能有什么问题?

问题描述

我们调用 Google API 的代码行 在此处输入图像描述

回复:

<HEAD>
<TITLE>HTTP method PUT is not supported by this URL</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
<H1>HTTP method PUT is not supported by this URL</H1>
<H2>Error 405</H2>
</BODY>
</HTML>
, finalURL=https://www.googleapis.com/auth/admin/directory/v1/users/ttestaccount@pps.net, headers={Alt-Svc=h3-Q050=":443"; ma=2592000,h3-29=":443"; ma=2592000,h3-27=":443"; ma=2592000,h3-T051=":443"; ma=2592000,h3-T050=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43", Cache-Control=private, max-age=0, Content-Security-Policy=frame-ancestors 'self', Content-Type=text/html; charset=UTF-8, Date=Tue, 22 Sep 2020 23:03:06 GMT, Expires=Tue, 22 Sep 2020 23:03:06 GMT, Server=GSE, Transfer-Encoding=chunked, X-Content-Type-Options=nosniff, X-Frame-Options=SAMEORIGIN, X-XSS-Protection=1; mode=block}, initialURL=https://www.googleapis.com/auth/admin/directory/v1/users/ttestaccount@pps.net, statusCode=405.0, statusReason=HTTP method PUT is not supported by this URL}
<br><br>

似乎我使用的 URL 格式与此处的 Google 参考指南中推荐的 URL 格式相同: https ://developers.google.com/admin-sdk/directory/v1/reference/users/update

在此处输入图像描述

标签: google-apigoogle-admin-sdkgoogle-directory-api

解决方案


推荐阅读