无法生成访问和刷新令牌(Gmail API)

我正在尝试使用Google API。我无法生成访问和刷新令牌。

必须生成访问和刷新令牌,我知道我们可以从命令行使用Curl命令执行以下操作。

curl \
--request POST \
--data "code=XXX&client_id=XXX&client_secret=XXX&redirect_uri=https://localhost&grant_type=authorization_code" \
https://accounts.google.com/o/oauth2/token

我已经尝试过的以下事情-

  1. 在邮递员上,错误-> {“ error”:“ unsupported_grant_type”,“ error_description”:“无效的grant_type:”}

  2. 在cmd上,错误-> * curl:(6)无法解析主机:*

  3. 在Powershell上,当我键入 * curl * 时,错误-> curl:无效的URI:无法解析主机名。 在第1行:char:1 卷曲 ~~ CategoryInfo:未指定:(:) [Invoke-WebRequest],UriFormatException FullyQualifiedErrorId:System.UriFormatException,microsoft.PowerShell.Commands.InvokeWebRequestCommand

信息- curl --version curl 7.55.1(Windows)libcurl / 7.55.1 WinSSL

请帮助生成访问和刷新令牌。

谢谢:)

iCMS 回答:无法生成访问和刷新令牌(Gmail API)

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/2257606.html

大家都在问