为什么在使用GuzzleHttp时出现错误?

时间:2019-08-19 22:05:24

标签: php guzzle

我使用的代码显示错误。

Auth

文档:https://anilist.gitbook.io/anilist-apiv2-docs/overview/oauth/authorization-code-grant#converting-authorization-codes-to-access-tokens

我应该以{{1​​}}结尾,但出现错误:

  

致命错误:未捕获的GuzzleHttp \ Exception \ ClientException:客户端错误:“ POST https://anilist.co/api/v2/oauth/token”导致了“ 400 Bad Request”响应:{“ error”:“ unsupported_grant_type”,“ message”:“授权授权服务器不支持授予类型。” (截断...)在C:\ web \ site \ com \ api \ vendor \ guzzlehttp \ guzzle \ src \ Exception \ RequestException.php:113堆栈跟踪:#0 C:\ web \ site \ com \ api \ vendor \ guzzlehttp \ guzzle \ src \ Middleware.php(66):GuzzleHttp \ Exception \ RequestException :: create(Object(GuzzleHttp \ Psr7 \ Request),Object(GuzzleHttp \ Psr7 \ Response))#1 C:\ web \ site \ com \ api \ vendor \ guzzlehttp \ promises \ src \ Promise.php(203):GuzzleHttp \ Middleware :: GuzzleHttp {closure}(Object(GuzzleHttp \ Psr7 \ Response))#2 C:\ web \ site \ com \ api \ vendor \ guzzlehttp \ promises \ src \ Promise.php(156):GuzzleHttp \ Promise \ Promise :: callHandler(1,Object(GuzzleHttp \ Psr7 \ Response),Array)#3 C:\ web \ site \ com \ api \ vendor \ guzzlehttp \ promises \ src \ TaskQueue.php(47):GuzzleHttp \ Promise \ Promise :: GuzzleHttp \ Promise {closure}()#在C:\ web \ site \ com \ api \ vendor \ guzzlehttp \ guzzle \ src \ Exception \ RequestException.php在第113行`

0 个答案:

没有答案