在测试Gotosocial 时发现 通过链接${Host}/api/v1/accounts/${userId}/statuses?limit=${limit}&exclude_replies=true&only_public=true 访问不到数据,提示Unauthorized: token not supplied需要提供token.

mastodonpleroma 还是可以正常访问的.

为了更好的解决这个问题(其实之前通过cloudflare workers已经可以解决了) 参见 https://www.imsun.org/archives/1643.html#%E9%80%9A%E8%BF%87Cloudflare-Workers%E8%8E%B7%E5%8F%96json%E6%95%B0%E6%8D%AE

这次使用vercel拿到数据.

https://github.com/jkjoy/Gotosocial-API-Vercel

主要代码是python

直接部署在vercel

环境变量

HOST=Gotosocial实例地址
USER_ID=Gotosocial用户ID
TOKEN=access_token

演示 https://gts.ima.cm

本文作者:浪子 @ 提剑追梦

本文链接:https://blog.imsun.org/blog/1695/

本文标题:Gotosocial 通过API获取用户Timeline

本文版权:本博客所有文章除特别声明外,均采用 BY-NC-SA 许可协议。转载请注明出处!