Gotosocial 通过API获取用户Timeline
在测试Gotosocial 时发现
通过链接${Host}/api/v1/accounts/${userId}/statuses?limit=${limit}&exclude_replies=true&only_public=true
访问不到数据,提示Unauthorized: token not supplied
需要提供token
.
而mastodon
和 pleroma
还是可以正常访问的.
为了更好的解决这个问题(其实之前通过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://www.imsun.org/archives/1695.html
复制成功!