实现OAuth库以连接到ETSY存储时出现致命错误

 陈宏儒64721 发布于 2023-01-31 15:15

我正在使用OAuth库连接到我的Etsy商店(etsy.com)并尝试检索有关已售出订单的一些信息.

这是库:https://github.com/Lusitanian/PHPoAuthLib/blob/master/examples/etsy.php

但是,在"允许访问"后,我一直收到错误消息.我收到一个令牌,但当我允许访问时,问题就出现了.

这是完整的错误:

  Fatal error: Uncaught exception 'OAuth\Common\Http\Exception\TokenResponseException' with message 'file_get_contents(http://openapi.etsy.com/v2/private/users/__SELF__): failed to open stream: HTTP request failed! 
HTTP/1.1 400 Bad Request ' in /hermes/bosoraweb013/b1151/ipg.tahara/APIs/PHPoAuthLib-master/src/OAuth/Common/Http/Client/StreamClient.php:70 Stack trace: #0 /hermes/bosoraweb013/b1151/ipg.tahara/APIs/PHPoAuthLib-master/src/OAuth/OAuth1/Service/AbstractService.php(137): 
OAuth\Common\Http\Client\StreamClient->retrieveResponse(Object(OAuth\Common\Http\Uri\Uri), NULL, Array, 'GET') #1 /hermes/bosoraweb013/b1151/ipg.tahara/APIs/PHPoAuthLib-master/examples/etsy.php(47): 
OAuth\OAuth1\Service\AbstractService->request('/private/users/...') #2 {main} thrown in /hermes/bosoraweb013/b1151/ipg.tahara/APIs/PHPoAuthLib-master/src/OAuth/Common/Http/Client/StreamClient.php on line 70

有人会有任何意见来确定问题是什么吗?

撰写答案
今天,你开发时遇到什么问题呢?
立即提问
热门标签
PHP1.CN | 中国最专业的PHP中文社区 | PNG素材下载 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有