簡體   English   中英

Python 與 Podio 集成

[英]Python integration with Podio

我無法使用 Podio 的 Python 庫。 我下載了 GitHub 存儲庫來處理它。 但是得到一個錯誤。 代碼:

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

錯誤:

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"}

這與我與令牌關聯的域名有關系嗎? 如果是這樣,那么請告訴我如果我沒有從任何服務器運行腳本,我應該為域設置什么值。

您傳遞6769item_id似乎不是真實的,或者您無權訪問該項目。 傳遞正確的item_id試。 您可以從 Podio 項目視圖的Actions菜單中的Developer Info選項中找到item_id

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM