Closed deadpixel134 closed 1 year ago
it looks like the API now need an additional "X-CSRF-Token" header or it will response 403. this token seems to change everytime, some workaround is needed.
Agree. Same issue is received with multiple session IDs/cookies/posts.
Is there a way to solve this?
From what I can tell this is only required on API calls to the /posts endpoint currently. A new CSRF token will be generated on each page load, as seen in the post page source:
<meta name="csrf-token" content="GUvDwTBBc1Q4luaNH4ukLbbSzAoZwm1-Sc07qU8dYGtsvB80QKGf9mgNWCJQW8tbfodX2-WmOBPJchDhxKTLEw" /
This token is present on every page but I don't see any other places it's actively being used. We will probably want to eventually implement this for every API request by first hitting the actual page everywhere, but I believe what needs to happen for now is:
X-CSRF-Token
header to /api/v1/posts/{}
requestsThe referenced commit should fix this. Would appreciate tests to see if there are any other requests that seem to return 403.
It's seems to be working to me. I think we can close this issue but maybe need more people confirm that it's working.
Got enough reports this is working so closing out, new release soon.
Today I got this message.
Checked my cookies.txt, updated to latest one but no luck.