Python 提供给API的沙盒密钥没有沙盒端点 导入请求 >>>从requests.auth导入HTTPBasicAuth >>>url='1〕https://api.stubhub.com/login' >>>用户='Jlu4IelEtiaq8moJkJKgQFDxofEa'#沙盒使用者密钥 >>>普华永道 >r=requests.get('https://api.stubhub.com/search/inventory/v1?eventid=9107490',cookies=cookies,headers={'Authorization':'Bearer zjhhxrtrcyvde39mvgpcfir0ojca'}) >>>r.text “900901Status reportRuntime ErrorSandbox密钥提供给没有沙盒端点的API”
已使用我的沙箱中的应用程序令牌和登录时收到的访问令牌尝试了请求,如果两种方式都失败了。任何帮助都将不胜感激。这真的让我发疯。我解决了产生此错误的问题。我研究了端点是什么,端点是正在使用的API方法或函数,进一步搜索表明,当访问沙箱时,API域是Python 提供给API的沙盒密钥没有沙盒端点 导入请求 >>>从requests.auth导入HTTPBasicAuth >>>url='1〕https://api.stubhub.com/login' >>>用户='Jlu4IelEtiaq8moJkJKgQFDxofEa'#沙盒使用者密钥 >>>普华永道 >r=requests.get('https://api.stubhub.com/search/inventory/v1?eventid=9107490',cookies=cookies,headers={'Authorization':'Bearer zjhhxrtrcyvde39mvgpcfir0ojca'}) >>>r.text “900901Status reportRuntime ErrorSandbox密钥提供给没有沙盒端点的API”,python,python-requests,Python,Python Requests,已使用我的沙箱中的应用程序令牌和登录时收到的访问令牌尝试了请求,如果两种方式都失败了。任何帮助都将不胜感激。这真的让我发疯。我解决了产生此错误的问题。我研究了端点是什么,端点是正在使用的API方法或函数,进一步搜索表明,当访问沙箱时,API域是 在消除错误后,我开始得到一个不同的错误 >>> r = requests.get( 'https://api.stubhub.com/search/inventory/v1?eventid=9107490', cookies=cooki
在消除错误后,我开始得到一个不同的错误
>>> r = requests.get( 'https://api.stubhub.com/search/inventory/v1?eventid=9107490', cookies=cookies, headers={'Authorization': 'Bearer ZjjHxrtrcYVDE39MVGPcfIR0OJca'})
>>> r.text
'<am:fault xmlns:am="http://wso2.org/apimanager"><am:code>900901</am:code><am:type>Status report</am:type><am:message>Runtime Error</am:message><am:description>Sandbox key offered to the API with no sandbox endpoint</am:description></am:fault>'
所以我从沙箱搬到了生产环境,现在一切都正常了。“在消除错误后,我开始得到一个不同的错误。”但您是如何消除第一个错误的?您已将其标记为“答案”,但它不包含原始问题的答案?我通过更改url参数删除了第一个错误,以请编辑您的答案,并将最后的注释添加到答案中以使答案易于理解。
>>> r = requests.get( 'https://api.stubhub.com/search/inventory/v1?eventid=9107490', cookies=cookies, headers={'Authorization': 'Bearer ZjjHxrtrcYVDE39MVGPcfIR0OJca'})
>>> r.text
'<am:fault xmlns:am="http://wso2.org/apimanager"><am:code>900901</am:code><am:type>Status report</am:type><am:message>Runtime Error</am:message><am:description>Sandbox key offered to the API with no sandbox endpoint</am:description></am:fault>'
site is not available since below pool is down