我可以访问一个API,我正试图利用它来实现一些任务的自动化,我直接进入了它,但是被JWT阻碍了,我从未使用过它。我也有几年没有使用python了,所以我有点生疏了。请容忍我。在
以下是API文档的直接引用:The authentication mode for an organization is with a JSON Web Token. Users
must pass a JSON Web Token (JWT) in the header of each API request made.
To obtain the JWT, send the user’s API key (UUID) and password in a JSON Web
Token GET Request. The authorization method of “Bearer” and a
space is then prefixed to the encoded token string returned. The token will
be tied to the user account that generated the JWT.
我试过使用requests,但是我得到了405个错误,我还安装并导入了pyjwt,但这让我很困惑。这就是我试图通过python发送的内容:
^{pr2}$
我已经验证了目标API是否正常工作,因为有一小部分功能可以在没有JWT的情况下工作,并且可以通过requests轻松访问
欢迎提供建议,任何教程也一样。我试着读过几篇JWT教程,但是我很难把它翻译成python。在
谢谢!在
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)