首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Python与Podio的集成

Python与Podio的集成
EN

Stack Overflow用户
提问于 2020-06-03 14:26:13
回答 1查看 229关注 0票数 1

我无法使用Podio的Python库。我下载了GitHub存储库来处理它。但却犯了个错误。代码:

代码语言:javascript
复制
from podio.pypodio2.api import OAuthClient

c = OAuthClient(
    '************',
    '************',
    '************',
    '************'    
)

print(c.domain)
x = lambda x,y: (x,y)
result = c.Item.find(6769, basic=True, handler=x)
print(result, data) #Returned info

错误:

代码语言:javascript
复制
Traceback (most recent call last):
  File "test.py", line 11, in <module>
    result = c.Item.find(6769, basic=True, handler=x)
  File "C:\Users\hp\Desktop\podio\pypodio2\areas.py", line 93, in find
    return self.transport.GET(url='/item/%d/basic' % item_id)
  File "C:\Users\hp\Desktop\podio\pypodio2\transport.py", line 145, in __call__
    return handler(response, data)
  File "C:\Users\hp\Desktop\podio\pypodio2\transport.py", line 215, in _handle_response
    raise TransportException(response, data)
podio.pypodio2.transport.TransportException: TransportException({'server': 'nginx', 'date': 'Wed, 03 Jun 2020 14:22:43 GMT', 'content-type': 'application/json; charset=utf-8', 'content-length': '279', 'connection': 'keep-alive', 'x-rate-limit-remaining': '999', 'x-rate-limit-limit': '1000', 'x-podio-auth-ref': 'user_5424431', 'x-podio-request-id': 'a5ufc4W3', 'strict-transport-security': 'max-age=31535999', 'status': '403'}): {"error_parameters":{},"error_detail":null,"error_propagate":false,"request":{"url":"http:\/\/api.podio.com\/item\/6769\/basic","query_string":"","method":"GET"},"error_description":"The user with id 5424431 does not have the right view on item with id 6769","error":"forbidden"}

这与我与令牌相关的域名有关系吗?如果是这样的话,那么如果我没有从任何服务器运行脚本,请告诉我应该为域设置什么值。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2020-06-08 05:01:59

您传递的item_id似乎不是真正的6769,或者您无法访问该项。传递正确的item_id并重试。您可以从Podio视图中的item_id Actions菜单中的Developer Info选项中找到

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/62175324

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档